From 9e21f938484936338a5b1f064a8a1633ea26d897 Mon Sep 17 00:00:00 2001 From: Kat Date: Thu, 27 Jun 2024 14:12:45 +0100 Subject: [PATCH] Fix test --- spec/helpers/tab_nav_helper_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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