diff --git a/spec/services/projects/create_service_integration_spec.rb b/spec/services/projects/create_service_integration_spec.rb index 83111ca45015..d1b13119ed5d 100644 --- a/spec/services/projects/create_service_integration_spec.rb +++ b/spec/services/projects/create_service_integration_spec.rb @@ -55,7 +55,7 @@ .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 e2e45dbd7809..7c9b1373706c 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 @@ 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