-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove test that is not currently ready for use.
- Loading branch information
Jonathan Wenger
committed
Feb 21, 2024
1 parent
2be5516
commit 2632d50
Showing
1 changed file
with
29 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
require 'json' | ||
require 'dotenv/load' | ||
require 'avalara_sdk/auth/oauth_helper' | ||
# require 'json' | ||
# require 'dotenv/load' | ||
# require 'avalara_sdk/auth/oauth_helper' | ||
|
||
describe 'OAuthHelper' do | ||
before(:all) do | ||
@config = AvalaraSdk::Configuration.new | ||
@config.client_id = ENV["CLIENT_ID"] | ||
@config.client_secret = " " | ||
@config.environment='production' | ||
@config.app_name="testApp" | ||
@config.app_version="2.3.1" | ||
@config.machine_name="AVL_WIN_007" | ||
@config.debugging=false | ||
end | ||
# describe 'OAuthHelper' do | ||
# before(:all) do | ||
# @config = AvalaraSdk::Configuration.new | ||
# @config.client_id = ENV["CLIENT_ID"] | ||
# @config.client_secret = " " | ||
# @config.environment='production' | ||
# @config.app_name="testApp" | ||
# @config.app_version="2.3.1" | ||
# @config.machine_name="AVL_WIN_007" | ||
# @config.debugging=false | ||
# end | ||
|
||
describe 'test OAuthHelper' do | ||
it 'should be to initiate the device code flow' do | ||
begin | ||
device_auth_result = AvalaraSdk::Auth::OAuthHelper.initiate_device_authorization_flow("avatax_api", @config) | ||
expect(device_auth_result.verification_url).to eq "https://identity.avalara.com/device" | ||
token_result = AvalaraSdk::Auth::OAuthHelper.get_access_token_for_device_flow(device_auth_result.device_code, @config) | ||
expect(token_result.error_message).to eq "authorization_pending" | ||
expect(token_result.http_status_code).to eq 400 | ||
puts "Call Completed" | ||
rescue AvalaraSdk::ApiError => e | ||
puts "Exception #{e}" | ||
end | ||
end | ||
end | ||
# describe 'test OAuthHelper' do | ||
# it 'should be to initiate the device code flow' do | ||
# begin | ||
# device_auth_result = AvalaraSdk::Auth::OAuthHelper.initiate_device_authorization_flow("avatax_api", @config) | ||
# expect(device_auth_result.verification_url).to eq "https://identity.avalara.com/device" | ||
# token_result = AvalaraSdk::Auth::OAuthHelper.get_access_token_for_device_flow(device_auth_result.device_code, @config) | ||
# expect(token_result.error_message).to eq "authorization_pending" | ||
# expect(token_result.http_status_code).to eq 400 | ||
# puts "Call Completed" | ||
# rescue AvalaraSdk::ApiError => e | ||
# puts "Exception #{e}" | ||
# end | ||
# end | ||
# end | ||
|
||
end | ||
# end |