test/createsend_test.rb in createsend-0.3.1 vs test/createsend_test.rb in createsend-0.3.2
- old
+ new
@@ -74,18 +74,18 @@
stub_post(@api_key, "clients.json", (status.first == '400' or status.first == '401') ? 'custom_api_error.json' : nil, status)
lambda { CreateSend::Client.create "Client Company Name", "Client Contact Name", "client@example.com",
"(GMT+10:00) Canberra, Melbourne, Sydney", "Australia" }.should raise_error(exception)
end
end
-
+
context "#{status.first}, a put" do
should "raise a #{exception.name} error" do
stub_put(@api_key, "templates/#{@template.template_id}.json", (status.first == '400' or status.first == '401') ? 'custom_api_error.json' : nil, status)
lambda { @template.update "Template One Updated", "http://templates.org/index.html",
- "http://templates.org/files.zip", "http://templates.org/screenshot.jpg" }.should raise_error(exception)
+ "http://templates.org/files.zip" }.should raise_error(exception)
end
end
-
+
context "#{status.first}, a delete" do
should "raise a #{exception.name} error" do
stub_delete(@api_key, "templates/#{@template.template_id}.json", (status.first == '400' or status.first == '401') ? 'custom_api_error.json' : nil, status)
lambda { @template.delete }.should raise_error(exception)
end