diff --git a/spec/helpers/tab_nav_helper_spec.rb b/spec/helpers/tab_nav_helper_spec.rb index 7b4efc5eb..9dbf92e7a 100644 --- a/spec/helpers/tab_nav_helper_spec.rb +++ b/spec/helpers/tab_nav_helper_spec.rb @@ -2,21 +2,21 @@ require "rails_helper" RSpec.describe TabNavHelper do let(:organisation) { FactoryBot.create(:organisation) } - let(:user) { FactoryBot.build(:user, organisation:) } + let(:current_user) { FactoryBot.build(:user, organisation:) } let(:scheme) { FactoryBot.create(:scheme, service_name: "Some name") } let(:location) { FactoryBot.create(:location, scheme:) } describe "#user_cell" do it "returns user link and email separated by a newline character" do - expected_html = "#{user.name}\nUser #{user.email}" - expect(user_cell(user)).to match(expected_html) + expected_html = "#{current_user.name}\nUser #{current_user.email}" + expect(user_cell(current_user)).to match(expected_html) end end describe "#org_cell" do it "returns the users org name and role separated by a newline character" do expected_html = "DLUHC\nData provider" - expect(org_cell(user)).to match(expected_html) + expect(org_cell(current_user)).to match(expected_html) end end