Sha256: 17fed5f7bdef69d3f76f46b082ee039149e5cc1368edf8961fa3d76d04efa478

Contents?: true

Size: 700 Bytes

Versions: 6

Compression:

Stored size: 700 Bytes

Contents

require File.dirname(__FILE__) + "/test_helper.rb"

class DreamySubscriberTest < Test::Unit::TestCase

  context "Creation" do
    setup do
      @xml = <<EOF
<data>
    <email>joe@schmoe.com</email>
    <confirmed>1</confirmed>
    <subscribe_date>2007-12-13 16:55:15</subscribe_date>
    <name>Josh</name>
    <num_bounces>0</num_bounces>
</data>
EOF
    end

    should "create a new user from xml" do
      s = Dreamy::Subscriber.new_from_xml(Hpricot.XML(@xml))
      assert_equal "joe@schmoe.com", s.email
      # assert_equal "1", s.confirmed
      assert_equal "2007-12-13 16:55:15", s.subscribe_date
      assert_equal "Josh", s.name
      assert_equal "0", s.num_bounces
    end
  end
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sant0sk1-dreamy-0.1.2 test/subscriber_test.rb
sant0sk1-dreamy-0.2.0 test/subscriber_test.rb
sant0sk1-dreamy-0.2.1 test/subscriber_test.rb
sant0sk1-dreamy-0.2.2 test/subscriber_test.rb
sant0sk1-dreamy-0.2.3 test/subscriber_test.rb
sant0sk1-dreamy-0.2.4 test/subscriber_test.rb