test/client_test.rb in createsend-2.3.0 vs test/client_test.rb in createsend-2.4.0

- old
+ new

@@ -105,9 +105,20 @@ res.Results.first.EmailAddress.should == "example+1@example.com" res.Results.first.Date.should == "2010-10-26 10:55:31" res.Results.first.State.should == "Suppressed" end + should "suppress a single email address" do + email = "example@example.com" + stub_post(@api_key, "clients/#{@client.client_id}/suppress.json", nil) + result = @client.suppress email + end + + should "suppress multiple email address" do + stub_post(@api_key, "clients/#{@client.client_id}/suppress.json", nil) + result = @client.suppress [ "one@example.com", "two@example.com" ] + end + should "unsuppress an email address" do email = "example@example.com" stub_put(@api_key, "clients/#{@client.client_id}/unsuppress.json?email=#{CGI.escape(email)}", nil) result = @client.unsuppress email end