| 
					
				 | 
			
			
				@@ -216,8 +216,7 @@ class SessionTest < Test::Unit::TestCase 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   test "return true when the signature is valid and the keys of params are strings" do 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     params = { 'code' => 'any-code', 'timestamp' => Time.now } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     params[:hmac] = generate_signature(params) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    action_params = ActionController::Parameters.new params 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    assert_equal true, ShopifyAPI::Session.validate_signature(action_params) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    assert_equal true, ShopifyAPI::Session.validate_signature(params) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   end 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   test "return true when validating signature of params with ampersand and equal sign characters" do 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -225,8 +224,7 @@ class SessionTest < Test::Unit::TestCase 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     params = { 'a' => '1&b=2', 'c=3&d' => '4' } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     to_sign = 'a=1%26b=2&c%3D3%26d=4' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     params[:hmac] = generate_signature(to_sign) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    action_params = ActionController::Parameters.new params 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    assert_equal true, ShopifyAPI::Session.validate_signature(action_params) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    assert_equal true, ShopifyAPI::Session.validate_signature(params) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   end 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   test "return true when validating signature of params with percent sign characters" do 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -234,8 +232,7 @@ class SessionTest < Test::Unit::TestCase 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     params = { 'a%3D1%26b' => '2%26c%3D3' } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     to_sign = 'a%253D1%2526b=2%2526c%253D3' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     params[:hmac] = generate_signature(to_sign) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    action_params = ActionController::Parameters.new params 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    assert_equal true, ShopifyAPI::Session.validate_signature(action_params) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    assert_equal true, ShopifyAPI::Session.validate_signature(params) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   end 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   private 
			 |