Acceptance tests for user
This commit is contained in:
@@ -10,5 +10,17 @@ describe "persistance" do
|
||||
response.should include %|"ruby_class":"Employee"|
|
||||
response.should_not include %|"id":|
|
||||
end
|
||||
|
||||
it "stores time in UTC iso8601 format" do
|
||||
time = Time.utc(1981, 3, 9, 13, 22, 2).in_time_zone
|
||||
Timecop.travel time do
|
||||
employee_shift = create :employee_shift, start_from: time, end_on: time + 2.hours
|
||||
response = JSON.parse Net::HTTP.get URI(File.join(db_uri, employee_shift.id))
|
||||
response['created_at'].should eq "1981-03-09T13:22:02Z"
|
||||
response['updated_at'].should eq "1981-03-09T13:22:02Z"
|
||||
response['start_from'].should eq "1981-03-09T13:22:02Z"
|
||||
response['end_on'].should eq "1981-03-09T15:22:02Z"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user