Devise - Sad path to Linkedin OAuth controller

16 prikaza
Preskoči na prvu nepročitanu poruku

Celso Martins

nepročitano,
30. sij 2017. 13:23:3630. 01. 2017.
u Devise
Hi.

I would like to test when the user clicks in the cancel button in the authorization page:


http://jmp.sh/NgefJdv


and the devise flow goes to the OmniauthCallbacksController


http://jmp.sh/NatJTEa


How could I force the rspec to send the flow to this route?

this is the scenario I'm trying to test:


    context 'when the user deny the access' do
      it 'redirects to the new login session' do
        get :linkedin
        expect(response).to redirect_to new_user_session_path
      end
    end


Thanks in advance.


It is very sad to force people to register to a mailing list (Are we in 2017?!?!) or to the StackOverflow to ask a answer, having the issues in the github. IMO.


Odgovori svima
Odgovori autoru
Proslijedi
0 novih poruka