Acceptance tests for user

This commit is contained in:
2015-09-17 17:46:33 +02:00
parent 8e931cabd4
commit cb744943bd
35 changed files with 91 additions and 49 deletions
+12
View File
@@ -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