Skip to content

Commit

Permalink
Test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jufemaiz committed Feb 3, 2021
1 parent 697f064 commit a8f0c75
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ruby/tests/well_known_types_test.rb
Expand Up @@ -15,16 +15,18 @@ def test_timestamp

# millisecond accuracy
time = Time.at(123456, 654321)
ts.from_time(time)
resp = ts.from_time(time)
assert_equal 123456, ts.seconds
assert_equal 654321000, ts.nanos
assert_equal time, ts.to_time
assert_equal resp, ts

# nanosecond accuracy
time = Time.at(123456, Rational(654321321, 1000))
ts.from_time(time)
resp = ts.from_time(time)
assert_equal 654321321, ts.nanos
assert_equal time, ts.to_time
assert_equal resp, ts
end

def test_duration
Expand Down

0 comments on commit a8f0c75

Please sign in to comment.