Skip to content

Commit

Permalink
34 Fix failing session timeout test
Browse files Browse the repository at this point in the history
  • Loading branch information
cpreisinger committed Aug 22, 2024
1 parent 16be079 commit f7ba233
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spec/requests/sessions_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,16 @@
it "times out the session" do
session_timeout_in_minutes = ENV.fetch("SESSION_TIMEOUT_IN_MINUTES", 15)

email = "[email protected]"
token = SecureRandom.uuid

puts User.create!({email:, token:})

code = "ABC123"
login_gov = instance_double(LoginGov)
allow(LoginGov).to receive(:new).and_return(login_gov)
allow(login_gov).to receive(:exchange_token_from_auth_result).with(code).and_return(
[{ email: "[email protected]", sub: "sub" }]
[{ email:, sub: token }]
)
get "/auth/result", params: { code: }

Expand Down

0 comments on commit f7ba233

Please sign in to comment.