Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix resolution of timestamp

Oliver Günther9a6d628dbd45
diff --git a/spec/services/projects/create_service_integration_spec.rb b/spec/services/projects/create_service_integration_spec.rb
index 83111ca4501..d1b13119ed5 100644
--- a/spec/services/projects/create_service_integration_spec.rb
+++ b/spec/services/projects/create_service_integration_spec.rb
@@ -55,7 +55,7 @@ RSpec.describe Projects::CreateService, "integration", type: :model do
.to be_success
new_project.reload
- expect(new_project.created_at).to eq(created_at)
+ expect(new_project.created_at).to be_within(1.second).of created_at
end
end
diff --git a/spec/services/work_packages/create_service_integration_spec.rb b/spec/services/work_packages/create_service_integration_spec.rb
index e2e45dbd780..7c9b1373706 100644
--- a/spec/services/work_packages/create_service_integration_spec.rb
+++ b/spec/services/work_packages/create_service_integration_spec.rb
@@ -248,8 +248,8 @@ RSpec.describe WorkPackages::CreateService, "integration", type: :model do
expect(service_result)
.to be_success
- expect(new_work_package.created_at).to eq(created_at)
- expect(new_work_package.updated_at).to eq(updated_at)
+ expect(new_work_package.created_at).to be_within(1.second).of(created_at)
+ expect(new_work_package.updated_at).to be_within(1.second).of(updated_at)
end
end