diff --git a/spec/omniauth/strategies/remote_user_spec.rb b/spec/omniauth/strategies/remote_user_spec.rb index 41bccf5..1728c33 100644 --- a/spec/omniauth/strategies/remote_user_spec.rb +++ b/spec/omniauth/strategies/remote_user_spec.rb @@ -122,4 +122,17 @@ describe 'Test Strategy Remote_User' do end end + context 'Redirect After login in' do + before(:each){ + set_cookie '_remote_user=foobar' + set_cookie '_last_path=/dashboard' + get '/', {}, { 'HTTP_REMOTE_USER' => 'foobar' } + } + + it 'redirect to last path before login' do + expect(last_response.status).to eq(302) + expect(last_response.location).to eq('/dashboard') + end + end + end -- libgit2 0.21.2