Sha256: 2af5e45aa71151bb8061f202492eaae84844174a26ae5987e8eb7457bd21c6a8
Contents?: true
Size: 540 Bytes
Versions: 17
Compression:
Stored size: 540 Bytes
Contents
require 'spec_helper' describe Time, 'to_json' do it "should convert to utc and format the time in a way that i can use it for sorting in couchdb" do time = Time.parse('2009-01-01 11:12:23 +0200') expect(time.to_json).to eq("\"2009/01/01 09:12:23 +0000\"") end end describe Time, 'as_json' do it "should format it in the same way as to_json does so i can use this to do queries over time attributes" do time = Time.parse('2009-01-01 11:12:23 +0200') expect(time.as_json).to eq("2009/01/01 09:12:23 +0000") end end
Version data entries
17 entries across 17 versions & 1 rubygems