Open jcoyne opened 2 years ago
Shouldn't it be expect(response).to be_ok
?
Would expect(response.successful?).to be true
hang, too?
@pirj I think that be_successful is true for any 2xx based response. (e.g. :ok, :created, :no_content)
When I use expect(response.successful?).to be true
it fails right away as expected.
I'm having this same problem when going to rails >= 7.0 from latest supported version 6.1.3.3 (at time of writing). I've narrowed it down to something that changed in ActionDispatch::Request
with sessions. I mock auth (I'm using auth0 and mock_auth). It would set the session[:user_id]
which is visible in a request spec prior to issuing the get()
... but inside our auth logic at the controller level, that key is nil
. So it 403's.
Does it hang for you, too, @darrenterhune ?
I wouldn't say it hangs. It errors because I have an expectation of it to be 200 but it is a 403.
I'm seeing behavior where using
be_successful
hangs (rather than fails) when the request status is not a 200.hangs:
Fails right away:
with:
Using: