-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
What Ruby, Rails and RSpec versions are you using?
Ruby version: 3.0.0
Rails version: 6.1.3.2
RSpec version: 3.10.0
Observed behaviour
When making a request e.g.:
post '/user/login', params: { login: user.username, password: 'secret' }The session appears to be set correctly:
session
# => {"_csrf_token"=>"...", "user_id"=>"1", "return_to_url"=>nil, "flash"=>{"discard"=>[], "flashes"=>{"success"=>"Logged in successfully!"}}}But does not get passed to the next request:
delete '/user/logout'
# within the controller:
session
# => {}Expected behaviour
session should be correctly passed between requests within a system test run.
Can you provide an example app?
Sorcery/sorcery-rework @ commit a318267
rspec spec/system/user_logout_spec.rb
First byebug:
session # has stuff
Second byebug:
session # should have stuff, but does not
Additional notes
I have the feeling this might be me missing something in my dummy_app setup that's used to mock having a rails app to test against. That said, I've banged my head against this for almost a week now and can't figure out what I'm doing wrong.
Metadata
Metadata
Assignees
Labels
No labels