Skip to content

Commit

Permalink
Aggregate test to check the correction of the bug
Browse files Browse the repository at this point in the history
  • Loading branch information
vicentemendozam committed Jan 25, 2018
1 parent d871cf5 commit 3ed7465
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions spec/features/application_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
feature "Application" do

scenario "Try to access privileged options after closing session", :js do

ActionController::Base.allow_forgery_protection = true
position = create(:position)
user = FactoryGirl.create(:user, :admin)

login_as user

event = create(:event, user: user, title: 'Test event', position: position)
visit edit_event_path(event)

new_window = open_new_window
within_window new_window do
visit root_path
click_link I18n.t('backend.logout')
end

click_button I18n.t('backend.save')

expect(page).to have_content I18n.t 'devise.sessions.new.forgot_your_password'
expect(page).not_to have_content 'ActionController::InvalidAuthenticityToken'
end
end

0 comments on commit 3ed7465

Please sign in to comment.