FIX: Destroy session between omniauth callbacks controller tests

This commit is contained in:
David Taylor 2018-07-25 16:33:42 +01:00
parent 796639a797
commit f38942d121
1 changed files with 2 additions and 0 deletions

View File

@ -290,6 +290,8 @@ RSpec.describe Users::OmniauthCallbacksController do
user.reload
expect(user.email).to eq(old_email)
delete "/session/#{user.username}" # log out
response = login(new_identity)
expect(response['authenticated']).to eq(nil)
expect(response['email']).to eq(new_email)