mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Fixes issue #362 Change admin account link to point to account page instead of edit user.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
\: #{spree_current_user.email}
|
||||
%li{"data-hook" => "user-account-link"}
|
||||
%i.icon-user
|
||||
= link_to t(:account), spree.edit_user_path(spree_current_user)
|
||||
= link_to t(:account), account_path
|
||||
%li{"data-hook" => "user-logout-link"}
|
||||
%i.icon-signout
|
||||
= link_to t(:logout), spree.logout_path
|
||||
|
||||
@@ -2,6 +2,9 @@ require 'spec_helper'
|
||||
|
||||
feature "Authentication", js: true do
|
||||
include UIComponentHelper
|
||||
include AuthenticationWorkflow
|
||||
include WebHelper
|
||||
|
||||
let(:user) { create(:user, password: "password", password_confirmation: "password") }
|
||||
|
||||
scenario "logging into admin redirects home, then back to admin" do
|
||||
@@ -16,4 +19,10 @@ feature "Authentication", js: true do
|
||||
page.should have_content "Dashboard"
|
||||
current_path.should == spree.admin_path
|
||||
end
|
||||
|
||||
scenario "viewing my account" do
|
||||
login_to_admin_section
|
||||
click_link "Account"
|
||||
current_path.should == spree.account_path
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user