Skip to content

Commit

Permalink
another test
Browse files Browse the repository at this point in the history
  • Loading branch information
ohler55 committed Feb 28, 2015
1 parent 8339f5c commit 9dcee7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/test_compat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def test_time_ruby
assert_equal(expect, json)
end
def test_time_xml
t = Time.parse('2015-01-05 21:37:07.123456 -0800')
t = Time.xmlschema("2015-01-05T21:37:07.123456000-08:00")
json = Oj.dump(t, :mode => :compat, :time_format => :xmlschema, :second_precision => 6)
assert_equal('"2015-01-05T21:37:07.123456-08:00"', json)
end
Expand Down
4 changes: 2 additions & 2 deletions test/test_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,13 @@ def test_xml_time

def test_utc_time
Oj.default_options = { :mode => :object, :time_format => :xmlschema }
t = Time.now().utc
t = Time.parse('2015-01-05 21:37:07.123456789Z')
dump_and_load(t, false)
end

def test_ruby_time
Oj.default_options = { :mode => :object, :time_format => :ruby }
t = Time.now()
t = Time.parse('2015-01-05 21:37:07.123456789 -0700')
dump_and_load(t, false)
end

Expand Down

0 comments on commit 9dcee7e

Please sign in to comment.