diff --git a/spec/auth/oauth_helper_spec.rb b/spec/auth/oauth_helper_spec.rb index 93f244b..83b7ef2 100644 --- a/spec/auth/oauth_helper_spec.rb +++ b/spec/auth/oauth_helper_spec.rb @@ -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