Sha256: b76c8c71dcab7a116806f897aed48480550efcee7bb2da0881723ffda5110733
Contents?: true
Size: 838 Bytes
Versions: 2
Compression:
Stored size: 838 Bytes
Contents
require 'helper' class TestMessageBatchSubmission < Test::Unit::TestCase should "format scheduled date time correctly" do # yyyy-MM-ddThh:mm:ss target_time = Time.local(2011, 4, 7, 15, 0, 0) submission = MessageBatchSubmission.new("EX1234556", [Message.new("0777111222", "I'm sending this in the future")]) submission.send_at = target_time assert_equal "2011-04-07T15:00:00", submission.xml_node.at_xpath('//messages/sendat').content end should "contain multiple messages" do submission = MessageBatchSubmission.new("EX1234556", [Message.new("0777111222", "I'm sending this in the future"), Message.new("0777111333", "I'm sending this in the future")]) message_elements = submission.xml_node.xpath('//messages/message') assert_equal 2, message_elements.count end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
esendex-0.1.1 | test/test_message_batch.rb |
esendex-0.1.0 | test/test_message_batch.rb |