spec/paymill/client_spec.rb in paymill-0.0.2 vs spec/paymill/client_spec.rb in paymill-0.0.3
- old
+ new
@@ -15,16 +15,23 @@
client.description.should eql("First customer.")
end
end
describe ".find" do
- it "makes a new GET request using the correct API endpoint" do
+ it "makes a new GET request using the correct API endpoint to receive a specific client" do
Paymill.should_receive(:request).with(:get, "clients/123", {}).and_return("data" => {})
Paymill::Client.find("123")
end
end
+ describe ".all" do
+ it "makes a new GET request using the correct API endpoint to receive all clients" do
+ Paymill.should_receive(:request).with(:get, "clients/", {}).and_return("data" => {})
+ Paymill::Client.all
+ end
+ end
+
describe ".delete" do
it "makes a new DELETE request using the correct API endpoint" do
Paymill.should_receive(:request).with(:delete, "clients/123", {}).and_return(true)
Paymill::Client.delete("123")
end
@@ -34,6 +41,6 @@
it "makes a new POST request using the correct API endpoint" do
Paymill.should_receive(:request).with(:post, "clients", valid_attributes).and_return("data" => {})
Paymill::Client.create(valid_attributes)
end
end
-end
\ No newline at end of file
+end