Skip to content

Commit

Permalink
Remove test that is not currently ready for use.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Wenger committed Feb 21, 2024
1 parent 2be5516 commit 2632d50
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions spec/auth/oauth_helper_spec.rb
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

0 comments on commit 2632d50

Please sign in to comment.