mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-02 02:11:33 +00:00
Fix specs that relied on the old login page which we now redirect to the new page
This commit is contained in:
@@ -18,13 +18,13 @@ feature %q{
|
||||
current_path.should match(/^\/admin/)
|
||||
end
|
||||
|
||||
scenario "anonymous user can't access CMS admin" do
|
||||
scenario "anonymous user can't access CMS admin", js: true do
|
||||
visit cms_admin_path
|
||||
page.should_not have_content "ComfortableMexicanSofa"
|
||||
page.should have_content "Login"
|
||||
page.should have_content "Log in"
|
||||
end
|
||||
|
||||
scenario "non-admin user can't access CMS admin" do
|
||||
scenario "non-admin user can't access CMS admin", js: true do
|
||||
login_to_consumer_section
|
||||
visit cms_admin_path
|
||||
page.should_not have_content "ComfortableMexicanSofa"
|
||||
|
||||
@@ -68,9 +68,9 @@ module AuthenticationWorkflow
|
||||
user.spree_roles << user_role
|
||||
|
||||
visit spree.login_path
|
||||
fill_in 'spree_user_email', :with => 'someone@ofn.org'
|
||||
fill_in 'spree_user_password', :with => 'passw0rd'
|
||||
click_button 'Login'
|
||||
fill_in 'email', :with => 'someone@ofn.org'
|
||||
fill_in 'password', :with => 'passw0rd'
|
||||
click_button 'Log in'
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user