mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Moving around the authentication specs
This commit is contained in:
17
spec/features/admin/authentication_spec.rb
Normal file
17
spec/features/admin/authentication_spec.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature "Authentication", js: true do
|
||||
include UIComponentHelper
|
||||
describe "logging into admin" do
|
||||
let(:user) { create(:user, password: "password", password_confirmation: "password") }
|
||||
end
|
||||
|
||||
scenario "logging into admin redirects home, then back to admin" do
|
||||
visit spree.admin_path
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "Password", with: user.password
|
||||
click_login_button
|
||||
page.should have_content "Dashboard"
|
||||
current_path.should == spree.admin_path
|
||||
end
|
||||
end
|
||||
@@ -14,15 +14,6 @@ feature "Authentication", js: true do
|
||||
page.should have_content "Select a producer from the list below"
|
||||
current_path.should == producers_path
|
||||
end
|
||||
|
||||
scenario "logging into admin redirects home, then back to admin" do
|
||||
visit spree.admin_path
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "Password", with: user.password
|
||||
click_login_button
|
||||
page.should have_content "Dashboard"
|
||||
current_path.should == spree.admin_path
|
||||
end
|
||||
end
|
||||
|
||||
describe "Loggin in from the home page" do
|
||||
|
||||
Reference in New Issue
Block a user