-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Aggregate test to check the correction of the bug
- Loading branch information
1 parent
d871cf5
commit 3ed7465
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |