Update well_known_types_test.rb

pull/8254/head
Joel Courtney 3 years ago committed by GitHub
parent e4ce58cd60
commit 21478b371e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ruby/tests/well_known_types_test.rb

@ -33,13 +33,13 @@ class TestWellKnownTypes < Test::Unit::TestCase
time = Time.at(123456, Rational(654321321, 1000))
ts = Google::Protobuf::Timestamp.from_time(time)
assert_equal 123456, ts.seconds
assert_equal 654321000, ts.nanos
assert_equal 654321321, ts.nanos
assert_equal time, ts.to_time
# Instance method returns the same value as class method
assert_equal Google::Protobuf::Timestamp.new.from_time(time),
Google::Protobuf::Timestamp.from_time(time)
end
end
def test_duration
duration = Google::Protobuf::Duration.new(seconds: 123, nanos: 456)

Loading…
Cancel
Save