spec/cases/api_spec.rb in iprofiler-0.1.0 vs spec/cases/api_spec.rb in iprofiler-0.1.1
- old
+ new
@@ -53,10 +53,11 @@
client.api_key.should eq(new_api_key)
client.api_secret.should eq(new_api_secret)
client.api_host.should eq(new_api_host)
end
+
end
end
describe "authentication" do
@@ -65,9 +66,15 @@
end
it "should not be able to authenticate" do
client.api_key = "DUMMY KEY"
client.valid_credentials?.should eq(false)
+ end
+
+ it "empty authentication parameters should not be allowed" do
+ client.api_key = nil
+ reply = client.company_lookup({})
+ reply.status.should eq(:error)
end
end
describe "company lookup" do