From 1544d4494b03c64ac9122f9243c4756516711cb9 Mon Sep 17 00:00:00 2001 From: Robert Barrow Date: Wed, 5 Jun 2019 22:29:35 +0100 Subject: [PATCH] removed test file --- lib/test_harness.rb | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 lib/test_harness.rb diff --git a/lib/test_harness.rb b/lib/test_harness.rb deleted file mode 100644 index 7d34b2cb..00000000 --- a/lib/test_harness.rb +++ /dev/null @@ -1,40 +0,0 @@ -require 'excon' -# require 'httplog' - -class CustomWizard::APITestHarness - - def self.basic - - CustomWizard::Authorization.set_authentication_protocol("chargify", "basic_authentication") - CustomWizard::Authorization.set_username("chargify", "W2iA5khmmRso3oySy1KUeJP17ilUuN6OZkgT8PPwk") - CustomWizard::Authorization.set_password("chargify", "X") - authentication_string = CustomWizard::Authorization.get_header_authorization_string("chargify") - puts 'authentication string is ' + authentication_string - response = Excon.get( - "https://merefield-technology.chargify.com/subscriptions.json", - :headers => { - "Authorization" => "#{authentication_string}" - } - ) - JSON.parse(response.body) - end - - def self.oauth_two - - CustomWizard::Authorization.set_authentication_protocol("google", "OAuth2_authentication") - CustomWizard::Authorization.set_client_id("chargify", "W2iA5khmmRso3oySy1KUeJP17ilUuN6OZkgT8PPwk") - CustomWizard::Authorization.set_client_secret("chargify", "X") - - puts curl - authentication_string = CustomWizard::Authorization.get_header_authorization_string("chargify") - puts 'authentication string is ' + authentication_string - response = Excon.get( - "https://merefield-technology.chargify.com/subscriptions.json", - :headers => { - "Authorization" => "#{authentication_string}" - } - ) - JSON.parse(response.body) - end - -end