Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Dates are now stored as UTC, see andreasronge/neo4j-wrapper#7

Updated RSpecs
  • Loading branch information...
commit 8c1c0f2e7b3c98e778f67dbde1c3510306463f68 1 parent 24cad3e
@andreasronge andreasronge authored
Showing with 7 additions and 6 deletions.
  1. +7 −6 spec/integration/property_spec.rb
View
13 spec/integration/property_spec.rb
@@ -350,6 +350,7 @@ class UniqueHashRelationship < Neo4j::Rails::Relationship
subject do
@time ||= Time.now
@date_time ||= DateTime.now
+ @utc_date_time ||= @date_time.new_offset(0) # by default it store date as UTC dates
@date ||= Date.today
dp = DateProperties.create!(:time => @time, :date_time => @date_time, :date_property => @date)
DateProperties.find(dp.id)
@@ -361,12 +362,12 @@ class UniqueHashRelationship < Neo4j::Rails::Relationship
end
it "should have the correct date_time" do
- subject.date_time.year.should == @date_time.year
- subject.date_time.month.should == @date_time.month
- subject.date_time.day.should == @date_time.day
- subject.date_time.hour.should == @date_time.hour
- subject.date_time.min.should == @date_time.min
- subject.date_time.sec.should == @date_time.sec
+ subject.date_time.year.should == @utc_date_time.year
+ subject.date_time.month.should == @utc_date_time.month
+ subject.date_time.day.should == @utc_date_time.day
+ subject.date_time.hour.should == @utc_date_time.hour
+ subject.date_time.min.should == @utc_date_time.min
+ subject.date_time.sec.should == @utc_date_time.sec
subject.date_time.should be_a(DateTime)
end
Please sign in to comment.
Something went wrong with that request. Please try again.