test/transactional_timeline_test.rb in createsend-6.0.0 vs test/transactional_timeline_test.rb in createsend-6.1.0

- old
+ new

@@ -11,46 +11,46 @@ end should "get statistics with the default parameters" do stub_get(@auth, "transactional/statistics", "tx_statistics_classic.json") response = CreateSend::Transactional::Timeline.new(@auth).statistics - response.Sent.should == 1000 - response.Opened.should == 300 + response.Sent.should be == 1000 + response.Opened.should be == 300 end should "get statistics filtered by date and classic group" do stub_get(@auth, "transactional/statistics?from=2015-01-01&to=2015-06-30&timezone=client&group=Password%20Reset", "tx_statistics_classic.json") response = CreateSend::Transactional::Timeline.new(@auth).statistics( "from" => "2015-01-01", "to" => "2015-06-30", "timezone" => "client", "group" => "Password Reset" ) - response.Query.TimeZone.should == "(GMT+10:00) Canberra, Melbourne, Sydney" - response.Query.Group.should == "Password Reset" - response.Sent.should == 1000 + response.Query.TimeZone.should be == "(GMT+10:00) Canberra, Melbourne, Sydney" + response.Query.Group.should be == "Password Reset" + response.Sent.should be == 1000 end should "get statistics filtered by date and smart email" do stub_get(@auth, "transactional/statistics?from=2015-01-01&to=2015-06-30&timezone=utc&smartEmailID=#{@smart_email_id}", "tx_statistics_smart.json") response = CreateSend::Transactional::Timeline.new(@auth).statistics( "from" => "2015-01-01", "to" => "2015-06-30", "timezone" => "utc", "smartEmailID" => "bb4a6ebb-663d-42a0-bdbe-60512cf30a01" ) - response.Query.TimeZone.should == "UTC" - response.Query.SmartEmailID.should == "bb4a6ebb-663d-42a0-bdbe-60512cf30a01" - response.Sent.should == 1000 + response.Query.TimeZone.should be == "UTC" + response.Query.SmartEmailID.should be == "bb4a6ebb-663d-42a0-bdbe-60512cf30a01" + response.Sent.should be == 1000 end should "get the message timeline with default parameters" do stub_get(@auth, "transactional/messages", "tx_messages.json") response = CreateSend::Transactional::Timeline.new(@auth).messages - response.length.should == 3 - response[0].MessageID.should == "ddc697c7-0788-4df3-a71a-a7cb935f00bd" - response[0].Status.should == "Delivered" + response.length.should be == 3 + response[0].MessageID.should be == "ddc697c7-0788-4df3-a71a-a7cb935f00bd" + response[0].Status.should be == "Delivered" end should "get the message timeline for a smart email" do stub_get(@auth, "transactional/messages?status=all&count=200&sentBeforeID=#{@before_id}&sentAfterID=#{@after_id}&smartEmailID=#{@smart_email_id}&clientID=#{@client_id}", "tx_messages_smart.json") response = CreateSend::Transactional::Timeline.new(@auth).messages( @@ -59,13 +59,13 @@ "sentBeforeID" => @before_id, "sentAfterID" => @after_id, "smartEmailID" => @smart_email_id, "clientID" => @client_id ) - response.length.should == 1 - response[0].MessageID.should == "ddc697c7-0788-4df3-a71a-a7cb935f00bd" - response[0].Status.should == "Delivered" + response.length.should be == 1 + response[0].MessageID.should be == "ddc697c7-0788-4df3-a71a-a7cb935f00bd" + response[0].Status.should be == "Delivered" end should "get the message timeline for a classic group" do stub_get(@auth, "transactional/messages?status=all&count=200&sentBeforeID=#{@before_id}&sentAfterID=#{@after_id}&group=Password%20Reset&clientID=#{@client_id}", "tx_messages_classic.json") response = CreateSend::Transactional::Timeline.new(@auth).messages( @@ -74,35 +74,35 @@ "sentBeforeID" => @before_id, "sentAfterID" => @after_id, "group" => 'Password Reset', "clientID" => @client_id ) - response.length.should == 1 - response[0].Group.should == "Password Reset" - response[0].Status.should == "Delivered" + response.length.should be == 1 + response[0].Group.should be == "Password Reset" + response[0].Status.should be == "Delivered" end should "get the message details" do stub_get(@auth, "transactional/messages/#{@message_id}", "tx_message_details.json") response = CreateSend::Transactional::Timeline.new(@auth).details(@message_id) - response.TotalOpens.should == 1 - response.TotalClicks.should == 1 + response.TotalOpens.should be == 1 + response.TotalClicks.should be == 1 end should "get the message details with statistics" do stub_get(@auth, "transactional/messages/#{@message_id}?statistics=true", "tx_message_details_with_statistics.json") response = CreateSend::Transactional::Timeline.new(@auth).details(@message_id, :statistics => true) - response.Opens.length == 1 - response.Clicks.length == 1 + response.Opens.length.should be == 1 + response.Clicks.length.should be == 1 end should "resend a message" do stub_post(@auth, "transactional/messages/#{@message_id}/resend", "tx_send_single.json") response = CreateSend::Transactional::Timeline.new(@auth).resend(@message_id) - response.length.should == 1 - response[0].MessageID.should == "0cfe150d-d507-11e4-84a7-c31e5b59881d" - response[0].Recipient.should == "\"Bob Sacamano\" <bob@example.com>" - response[0].Status.should == "Received" + response.length.should be == 1 + response[0].MessageID.should be == "0cfe150d-d507-11e4-84a7-c31e5b59881d" + response[0].Recipient.should be == "\"Bob Sacamano\" <bob@example.com>" + response[0].Status.should be == "Received" end end end