Sha256: 0026197e5d78738c14301ddddcae5a1378bf892dcee55a9435509f1f81e7c5b4
Contents?: true
Size: 965 Bytes
Versions: 1
Compression:
Stored size: 965 Bytes
Contents
require File.dirname(__FILE__) + "/test_helper.rb" class DreamyUserTest < Test::Unit::TestCase context "Creation" do setup do @xml = <<EOF <data> <account_id>8675309</account_id> <disk_used_mb>123.04</disk_used_mb> <gecos>Joe Schmoe</gecos> <home>spork.Dreamy.com</home> <password>YahRight!</password> <quota_mb>50</quota_mb> <shell>/bin/bash</shell> <type>mail</type> <username>joe@schmoe.com</username> </data> EOF end should "create a new user from xml" do u = Dreamy::User.new_from_xml(Hpricot.XML(@xml)) assert_equal 8675309, u.account_id assert_equal 123.04, u.disk_used_mb assert_equal "Joe Schmoe", u.gecos assert_equal "spork.Dreamy.com", u.home assert_equal "YahRight!", u.password assert_equal 50, u.quota_mb assert_equal "/bin/bash", u.shell assert_equal "mail", u.type assert_equal "joe@schmoe.com", u.username end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sant0sk1-dreamy-0.3.0 | test/user_test.rb |