regression test for 19410 (back to logout)

pull/2792/head
Markus Kahl 10 years ago
parent cbc082c678
commit 6f1459b091
  1. 36
      spec/features/auth/omniauth_spec.rb

@ -29,6 +29,16 @@
require 'spec_helper'
describe 'Omniauth authentication', :type => :feature do
let(:user) do
FactoryGirl.create(:user,
force_password_change: false,
identity_url: 'developer:omnibob@example.com',
login: 'omnibob',
mail: 'omnibob@example.com',
firstname: 'omni',
lastname: 'bob'
)
end
before do
@omniauth_test_mode = OmniAuth.config.test_mode
@ -53,17 +63,6 @@ describe 'Omniauth authentication', :type => :feature do
end
context 'sign in existing user' do
let(:user) do
FactoryGirl.create(:user,
force_password_change: false,
identity_url: 'developer:omnibob@example.com',
login: 'omnibob',
mail: 'omnibob@example.com',
firstname: 'omni',
lastname: 'bob'
)
end
it 'should redirect to back url' do
visit account_lost_password_path
find_link('Omniauth Developer').click
@ -119,6 +118,21 @@ describe 'Omniauth authentication', :type => :feature do
expect(page).to have_content(I18n.t(:notice_logged_out))
expect(page).to have_content translation_substring(I18n.t(:instructions_after_logout))
end
it 'sign-in after previous sign-out shows my page' do
visit signout_path
expect(page).to have_content(I18n.t(:notice_logged_out))
click_on 'here'
fill_in('first_name', with: user.firstname)
fill_in('last_name', with: user.lastname)
fill_in('email', with: user.mail)
click_link_or_button 'Sign In'
expect(current_url).to eq my_page_url
end
end
shared_examples 'omniauth user registration' do

Loading…
Cancel
Save