summaryrefslogtreecommitdiff
path: root/test/wsdl
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-08 07:55:00 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-01-08 07:55:00 +0000
commitd69d6b6c368fef17958d647600c1d8ef7b602d7a (patch)
tree30e26b919127c2e34fe0ad1e780b11e9aab7e026 /test/wsdl
parent973c2ad00d5d9f8636b9472a245e56d5729fe3e0 (diff)
* test/wsdl/datetime/test_datetime.rb: fixed a stupid testcase which
dumps "E" at month-end. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/wsdl')
-rw-r--r--test/wsdl/datetime/test_datetime.rb36
1 files changed, 19 insertions, 17 deletions
diff --git a/test/wsdl/datetime/test_datetime.rb b/test/wsdl/datetime/test_datetime.rb
index 1a1bc59c65..405bd1209a 100644
--- a/test/wsdl/datetime/test_datetime.rb
+++ b/test/wsdl/datetime/test_datetime.rb
@@ -58,28 +58,30 @@ class TestDatetime < Test::Unit::TestCase
end
def test_datetime
- d1 = DateTime.now
- d2 = @client.now(d1)
- assert_equal(d2.year, d1.year)
- assert_equal(d2.month, d1.month)
- assert_equal(d2.day, d1.day + 1)
- assert_equal(d2.hour, d1.hour)
- assert_equal(d2.min, d1.min)
- assert_equal(d2.sec, d1.sec)
- assert_equal(d2.sec, d1.sec)
+ d = DateTime.now
+ d1 = d + 1
+ d2 = @client.now(d)
+ assert_equal(d1.year, d2.year)
+ assert_equal(d1.month, d2.month)
+ assert_equal(d1.day, d2.day)
+ assert_equal(d1.hour, d2.hour)
+ assert_equal(d1.min, d2.min)
+ assert_equal(d1.sec, d2.sec)
+ assert_equal(d1.sec, d2.sec)
end
def test_time
d = DateTime.now
t = Time.gm(d.year, d.month, d.day, d.hour, d.min, d.sec)
- d2 = d + 1
- t2 = @client.now(t)
- assert_equal(d2.year, t2.year)
- assert_equal(d2.month, t2.month)
- assert_equal(d2.day, t2.day)
- assert_equal(d2.hour, t2.hour)
- assert_equal(d2.min, t2.min)
- assert_equal(d2.sec, t2.sec)
+ d1 = d + 1
+ d2 = @client.now(t)
+ assert_equal(d1.year, d2.year)
+ assert_equal(d1.month, d2.month)
+ assert_equal(d1.day, d2.day)
+ assert_equal(d1.hour, d2.hour)
+ assert_equal(d1.min, d2.min)
+ assert_equal(d1.sec, d2.sec)
+ assert_equal(d1.sec, d2.sec)
end
end