[Groonga-commit] ranguba/rroonga at 0df1267 [master] Add test for leap second

Back to archive index

Hiroshi Hatake null+****@clear*****
Sat Jan 31 11:33:42 JST 2015


Hiroshi Hatake	2015-01-31 11:33:42 +0900 (Sat, 31 Jan 2015)

  New Revision: 0df1267ba38a593ba6be0674759f15dffa46ea3d
  https://github.com/ranguba/rroonga/commit/0df1267ba38a593ba6be0674759f15dffa46ea3d

  Message:
     Add test for leap second

  Modified files:
    test/test-record.rb

  Modified: test/test-record.rb (+20 -0)
===================================================================
--- test/test-record.rb    2015-01-09 03:11:12 +0900 (63e2adb)
+++ test/test-record.rb    2015-01-31 11:33:42 +0900 (26ec8f7)
@@ -652,5 +652,25 @@ class RecordTest < Test::Unit::TestCase
       }.to_json
       assert_equal(expected, groonga.to_json)
     end
+
+    def test_to_json_with_leap_second
+      ENV["TZ"] = "right/Japan"
+      created_at = Time.parse("2012-07-01T08:59:60+09:00")
+      values = {
+        "uri"        => "http://groonga.org/",
+        "rate"       => 5,
+        "comment"    => "Great!",
+        "created_at" => created_at,
+      }
+      groonga =****@bookm*****(values)
+      expected = {
+        "_id"        => groonga.id,
+        "comment"    => values["comment"],
+        "created_at" => created_at.iso8601,
+        "rate"       => values["rate"],
+        "uri"        => values["uri"],
+      }.to_json
+      assert_equal(expected, groonga.to_json)
+    end
   end
 end
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index