From 21478b371e0e71ead9fc1c357c261be7a168b1be Mon Sep 17 00:00:00 2001 From: Joel Courtney Date: Tue, 19 Oct 2021 12:25:21 +1100 Subject: [PATCH] Update well_known_types_test.rb --- ruby/tests/well_known_types_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruby/tests/well_known_types_test.rb b/ruby/tests/well_known_types_test.rb index 5fcc3dbabe..996dbc30a5 100755 --- a/ruby/tests/well_known_types_test.rb +++ b/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)