Skip to content
Browse files

Added support for including from name, from email, and reply to email…

… in drafts, scheduled, and sent campaigns.
  • Loading branch information...
1 parent bf2e645 commit 73122e1b989b9bd92c883f0985228a268f34cd30 @jdennes jdennes committed Dec 6, 2012
Showing with 27 additions and 0 deletions.
  1. +9 −0 test/client_test.rb
  2. +6 −0 test/fixtures/campaigns.json
  3. +6 −0 test/fixtures/drafts.json
  4. +6 −0 test/fixtures/scheduled_campaigns.json
View
9 test/client_test.rb
@@ -38,6 +38,9 @@ class ClientTest < Test::Unit::TestCase
campaigns.first.Name.should == 'Campaign One'
campaigns.first.SentDate.should == '2010-10-12 12:58:00'
campaigns.first.TotalRecipients.should == 2245
+ campaigns.first.FromName.should == 'My Name'
+ campaigns.first.FromEmail.should == 'myemail@example.com'
+ campaigns.first.ReplyTo.should == 'myemail@example.com'
end
should "get scheduled campaigns" do
@@ -52,6 +55,9 @@ class ClientTest < Test::Unit::TestCase
campaigns.first.DateCreated.should == "2011-05-24 10:37:00"
campaigns.first.PreviewURL.should == "http://createsend.com/t/r-DD543521A87C9B8B"
campaigns.first.PreviewTextURL.should == "http://createsend.com/t/r-DD543521A87C9B8B/t"
+ campaigns.first.FromName.should == 'My Name'
+ campaigns.first.FromEmail.should == 'myemail@example.com'
+ campaigns.first.ReplyTo.should == 'myemail@example.com'
end
should "get all drafts" do
@@ -64,6 +70,9 @@ class ClientTest < Test::Unit::TestCase
drafts.first.DateCreated.should == '2010-08-19 16:08:00'
drafts.first.PreviewURL.should == 'http://createsend.com/t/r-E97A7BB2E6983DA1'
drafts.first.PreviewTextURL.should == 'http://createsend.com/t/r-E97A7BB2E6983DA1/t'
+ drafts.first.FromName.should == 'My Name'
+ drafts.first.FromEmail.should == 'myemail@example.com'
+ drafts.first.ReplyTo.should == 'myemail@example.com'
end
should "get all lists" do
View
6 test/fixtures/campaigns.json
@@ -5,6 +5,9 @@
"CampaignID": "fc0ce7105baeaf97f47c99be31d02a91",
"Subject": "Campaign One",
"Name": "Campaign One",
+ "FromName": "My Name",
+ "FromEmail": "myemail@example.com",
+ "ReplyTo": "myemail@example.com",
"SentDate": "2010-10-12 12:58:00",
"TotalRecipients": 2245
},
@@ -14,6 +17,9 @@
"CampaignID": "072472b88c853ae5dedaeaf549a8d607",
"Subject": "Campaign Two",
"Name": "Campaign Two",
+ "FromName": "My Name",
+ "FromEmail": "myemail@example.com",
+ "ReplyTo": "myemail@example.com",
"SentDate": "2010-10-06 16:20:00",
"TotalRecipients": 11222
}
View
6 test/fixtures/drafts.json
@@ -3,6 +3,9 @@
"CampaignID": "7c7424792065d92627139208c8c01db1",
"Name": "Draft One",
"Subject": "Draft One",
+ "FromName": "My Name",
+ "FromEmail": "myemail@example.com",
+ "ReplyTo": "myemail@example.com",
"DateCreated": "2010-08-19 16:08:00",
"PreviewURL": "http://createsend.com/t/r-E97A7BB2E6983DA1",
"PreviewTextURL": "http://createsend.com/t/r-E97A7BB2E6983DA1/t"
@@ -11,6 +14,9 @@
"CampaignID": "2e928e982065d92627139208c8c01db1",
"Name": "Draft Two",
"Subject": "Draft Two",
+ "FromName": "My Name",
+ "FromEmail": "myemail@example.com",
+ "ReplyTo": "myemail@example.com",
"DateCreated": "2010-08-19 16:08:00",
"PreviewURL": "http://createsend.com/t/r-E97A7BB2E6983DA1",
"PreviewTextURL": "http://createsend.com/t/r-E97A7BB2E6983DA1/t"
View
6 test/fixtures/scheduled_campaigns.json
@@ -5,6 +5,9 @@
"CampaignID": "827dbbd2161ea9989fa11ad562c66937",
"Name": "Magic Issue One",
"Subject": "Magic Issue One",
+ "FromName": "My Name",
+ "FromEmail": "myemail@example.com",
+ "ReplyTo": "myemail@example.com",
"DateCreated": "2011-05-24 10:37:00",
"PreviewURL": "http://createsend.com/t/r-DD543521A87C9B8B",
"PreviewTextURL": "http://createsend.com/t/r-DD543521A87C9B8B/t"
@@ -15,6 +18,9 @@
"CampaignID": "4f54bbd2161e65789fa11ad562c66937",
"Name": "Magic Issue Two",
"Subject": "Magic Issue Two",
+ "FromName": "My Name",
+ "FromEmail": "myemail@example.com",
+ "ReplyTo": "myemail@example.com",
"DateCreated": "2011-05-24 10:39:00",
"PreviewURL": "http://createsend.com/t/r-DD913521A87C9B8B",
"PreviewTextURL": "http://createsend.com/t/r-DD913521A87C9B8B/t"

0 comments on commit 73122e1

Please sign in to comment.
Something went wrong with that request. Please try again.