From 1678e8c6a4d7e7a6829dde6b251ca276aab3c3af Mon Sep 17 00:00:00 2001 From: Kat Date: Wed, 20 Apr 2022 11:13:05 +0100 Subject: [PATCH] tests --- spec/features/organisation_spec.rb | 9 +++++---- spec/requests/organisations_controller_spec.rb | 6 +++--- spec/requests/users_controller_spec.rb | 7 +++++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/spec/features/organisation_spec.rb b/spec/features/organisation_spec.rb index 3fa703c79..600cb7daa 100644 --- a/spec/features/organisation_spec.rb +++ b/spec/features/organisation_spec.rb @@ -24,7 +24,7 @@ RSpec.describe "User Features" do context "when viewing organisation page" do it "defaults to organisation details" do visit("/logs") - click_link("Your organisation") + click_link("About Your Organisation") expect(page).to have_content(user.organisation.name) end @@ -32,7 +32,7 @@ RSpec.describe "User Features" do visit("/organisations/#{org_id}") click_link("Users") expect(page).to have_current_path("/organisations/#{org_id}/users") - click_link("Details") + click_link("About Your Organisation") expect(page).to have_current_path("/organisations/#{org_id}/details") end end @@ -72,10 +72,11 @@ RSpec.describe "User Features" do context "when viewing organisation page" do it "can see the details tab and users tab" do visit("/logs") - click_link("Your organisation") + click_link("About Your Organisation") expect(page).to have_current_path("/organisations/#{org_id}/details") - expect(page).to have_link("Details") + expect(page).to have_link("Logs") expect(page).to have_link("Users") + expect(page).to have_link("About Your Organisation") end end end diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index 44b7ca8ac..8d4e22690 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -66,7 +66,7 @@ RSpec.describe OrganisationsController, type: :request do end it "shows the tab navigation" do - expected_html = "