diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 19af05162..6a1a25962 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -37,10 +37,11 @@
service_url: '/'
) do |component|
if current_user.nil?
- component.navigation_item(text: 'Case logs', href: case_logs_path)
+ component.navigation_item(text: 'Sign in', href: user_session_path)
elsif
+ component.navigation_item(text: 'Case logs', href: case_logs_path)
component.navigation_item(text: 'Your organisation', href: "/organisations/#{current_user.organisation.id}")
- component.navigation_item(text: 'Your account', href: '/users/account')
+ component.navigation_item(text: 'Your account', href: users_account_path)
component.navigation_item(text: 'Sign out', href: destroy_user_session_path, options: {:method => :delete})
end
end
diff --git a/spec/features/user_spec.rb b/spec/features/user_spec.rb
index 45bf33cb9..d70e33ec8 100644
--- a/spec/features/user_spec.rb
+++ b/spec/features/user_spec.rb
@@ -87,12 +87,12 @@ RSpec.describe "User Features" do
it "Can navigate and sign in page with sign in button" do
visit("/")
- expect(page).to have_link("Case logs")
- click_link("Case logs")
+ expect(page).to have_link("Sign in")
+ click_link("Sign in")
fill_in("user[email]", with: user.email)
fill_in("user[password]", with: "pAssword1")
click_button("Sign in")
- expect(page).to have_current_path("/case-logs")
+ expect(page).to have_current_path("/")
end
it "tries to access account page, redirects to log in page" do