test/campaign_test.rb in createsend-2.4.0 vs test/campaign_test.rb in createsend-2.5.0
- old
+ new
@@ -147,10 +147,11 @@
summary.UniqueOpened.should == 5
summary.Mentions.should == 23
summary.Forwards.should == 11
summary.Likes.should == 32
summary.WebVersionURL.should == "http://createsend.com/t/r-3A433FC72FFE3B8B"
+ summary.WebVersionTextURL.should == "http://createsend.com/t/r-3A433FC72FFE3B8B/t"
summary.WorldviewURL.should == "http://client.createsend.com/reports/wv/r/3A433FC72FFE3B8B"
summary.SpamComplaints.should == 23
end
should "get the email client usage for a campaign" do
@@ -187,11 +188,11 @@
res.NumberOfPages.should == 110
res.Results.size.should == 20
res.Results.first.EmailAddress.should == "subs+6g76t7t0@example.com"
res.Results.first.ListID.should == "a994a3caf1328a16af9a69a730eaa706"
end
-
+
should "get the opens for a campaign" do
min_date = "2010-01-01"
stub_get(@api_key, "campaigns/#{@campaign.campaign_id}/opens.json?page=1&pagesize=1000&orderfield=date&orderdirection=asc&date=#{CGI.escape(min_date)}", "campaign_opens.json")
opens = @campaign.opens min_date
opens.Results.size.should == 5
@@ -236,10 +237,10 @@
clicks.PageSize.should == 1000
clicks.RecordsOnThisPage.should == 3
clicks.TotalNumberOfRecords.should == 3
clicks.NumberOfPages.should == 1
end
-
+
should "get the unsubscribes for a campaign" do
min_date = "2010-01-01"
stub_get(@api_key, "campaigns/#{@campaign.campaign_id}/unsubscribes.json?page=1&pagesize=1000&orderfield=date&orderdirection=asc&date=#{CGI.escape(min_date)}", "campaign_unsubscribes.json")
unsubscribes = @campaign.unsubscribes min_date
unsubscribes.Results.size.should == 1
\ No newline at end of file