spec/http_service_spec.rb in expedia-0.0.6 vs spec/http_service_spec.rb in expedia-0.0.7
- old
+ new
@@ -46,10 +46,11 @@
before :each do
Expedia.cid = ''
Expedia.api_key =''
Expedia.shared_secret = ''
+ Expedia.use_signature = true
end
it "returns a ligit MD5 checksum" do
@@ -60,9 +61,14 @@
it "returns a hash containing common params" do
Expedia::HTTPService.common_parameters.keys.should include(:cid)
Expedia::HTTPService.common_parameters.keys.should include(:apiKey)
Expedia::HTTPService.common_parameters.keys.should include(:sig)
Expedia::HTTPService.common_parameters.keys.should include(:_type)
+ end
+
+ it "checks to see if sig is removed from parameters" do
+ Expedia.use_signature = false
+ Expedia::HTTPService.common_parameters.keys.should_not include(:sig)
end
end
end