test/client_test.rb in createsend-0.3.0 vs test/client_test.rb in createsend-0.3.1

- old
+ new

@@ -28,25 +28,38 @@ should "get all campaigns" do stub_get(@api_key, "clients/#{@client.client_id}/campaigns.json", "campaigns.json") campaigns = @client.campaigns campaigns.size.should == 2 campaigns.first.CampaignID.should == 'fc0ce7105baeaf97f47c99be31d02a91' - campaigns.first.WebVersionURL.should == 'http://hello.createsend.com/t/ViewEmail/r/765E86829575EE2C/C67FD2F38AC4859C/' + campaigns.first.WebVersionURL.should == 'http://createsend.com/t/r-765E86829575EE2C' campaigns.first.Subject.should == 'Campaign One' campaigns.first.Name.should == 'Campaign One' campaigns.first.SentDate.should == '2010-10-12 12:58:00' campaigns.first.TotalRecipients.should == 2245 end + should "get scheduled campaigns" do + stub_get(@api_key, "clients/#{@client.client_id}/scheduled.json", "scheduled_campaigns.json") + campaigns = @client.scheduled + campaigns.size.should == 2 + campaigns.first.DateScheduled.should == "2011-05-25 10:40:00" + campaigns.first.ScheduledTimeZone.should == "(GMT+10:00) Canberra, Melbourne, Sydney" + campaigns.first.CampaignID.should == "827dbbd2161ea9989fa11ad562c66937" + campaigns.first.Name.should == "Magic Issue One" + campaigns.first.Subject.should == "Magic Issue One" + campaigns.first.DateCreated.should == "2011-05-24 10:37:00" + campaigns.first.PreviewURL.should == "http://createsend.com/t/r-DD543521A87C9B8B" + end + should "get all drafts" do stub_get(@api_key, "clients/#{@client.client_id}/drafts.json", "drafts.json") drafts = @client.drafts drafts.size.should == 2 drafts.first.CampaignID.should == '7c7424792065d92627139208c8c01db1' drafts.first.Name.should == 'Draft One' drafts.first.Subject.should == 'Draft One' drafts.first.DateCreated.should == '2010-08-19 16:08:00' - drafts.first.PreviewURL.should == 'http://hello.createsend.com/t/ViewEmail/r/E97A7BB2E6983DA1/C67FD2F38AC4859C/' + drafts.first.PreviewURL.should == 'http://createsend.com/t/r-E97A7BB2E6983DA1' end should "get all lists" do stub_get(@api_key, "clients/#{@client.client_id}/lists.json", "lists.json") lists = @client.lists