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

Add a dedicated time matcher and use it instead of `be_within.of`

Klaus Zanderscd4137e2cd18
diff --git a/spec/controllers/concerns/auth_source_sso_spec.rb b/spec/controllers/concerns/auth_source_sso_spec.rb
index e4800718553..0e58c459700 100644
--- a/spec/controllers/concerns/auth_source_sso_spec.rb
+++ b/spec/controllers/concerns/auth_source_sso_spec.rb
@@ -219,7 +219,7 @@ RSpec.describe MyController, :skip_2fa_stage do
expect(service).to have_received(:call!).with(other_user)
expect(response).to redirect_to my_account_path
- expect(user.reload.last_login_on).to be_within(10.seconds).of(Time.current)
+ expect(user.reload.last_login_on).to equal_time_without_usec(Time.current)
expect(session[:user_id]).to eq user.id
expect(session[:updated_at]).to be > session_update_time
end