Skip to content

Commit

Permalink
provide explicit expiry dates in spec to guarantee order
Browse files Browse the repository at this point in the history
  • Loading branch information
ulferts committed Dec 4, 2024
1 parent 25fc7cd commit 2df25c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/features/my/autologin_tokens_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@
RSpec.describe "My account autologin tokens management", :js, :with_cuprite do
include Redmine::I18n
shared_let(:user) { create(:user) }
shared_let(:old_token) { create(:autologin_token, user:, created_at: 1.year.ago) }
shared_let(:old_token) { create(:autologin_token, user:, created_at: 1.year.ago, expires_on: 1.year.ago + 1.day) }
shared_let(:new_token) do
create(:autologin_token,
user:,
data: { browser: "Mozilla Firefox", browser_version: "12.3", platform: "Linux" })
data: { browser: "Mozilla Firefox", browser_version: "12.3", platform: "Linux" },
expires_on: 1.day.from_now)
end

before do
Expand Down

0 comments on commit 2df25c8

Please sign in to comment.