diff --git a/app/helpers/tab_nav_helper.rb b/app/helpers/tab_nav_helper.rb index 73cae2643..c29ae5d86 100644 --- a/app/helpers/tab_nav_helper.rb +++ b/app/helpers/tab_nav_helper.rb @@ -21,11 +21,4 @@ module TabNavHelper role = "#{user.role.to_s.humanize}" [user.organisation.name, role].join("\n") end - - def tab_items(user) - [ - { name: "Details", url: details_organisation_path(user.organisation) }, - { name: "Users", url: users_organisation_path(user.organisation) }, - ] - end end diff --git a/spec/helpers/tab_nav_helper_spec.rb b/spec/helpers/tab_nav_helper_spec.rb index b2273aa11..7b4efc5eb 100644 --- a/spec/helpers/tab_nav_helper_spec.rb +++ b/spec/helpers/tab_nav_helper_spec.rb @@ -34,26 +34,4 @@ RSpec.describe TabNavHelper do expect(scheme_cell(scheme)).to match(expected_html) end end - - describe "#tab_items" do - context "when user is a data_coordinator" do - let(:user) { FactoryBot.build(:user, :data_coordinator, organisation:) } - - it "returns details and user tabs" do - result = tab_items(user).map { |i| i[:name] } - expect(result.count).to eq(2) - expect(result.first).to match("Details") - expect(result.second).to match("Users") - end - end - - context "when user is a data_provider" do - it "returns details and user tabs" do - result = tab_items(user).map { |i| i[:name] } - expect(result.count).to eq(2) - expect(result.first).to match("Details") - expect(result.second).to match("Users") - end - end - end end