fix(spec): another way to mock current_user

This commit is contained in:
simon lehericey 2024-01-08 14:30:19 +01:00
parent 560c2d763c
commit f96347caad

View file

@ -20,7 +20,7 @@ RSpec.describe MainNavigation::AnnouncesLinkComponent, type: :component do
user.build_instructeur
end
allow(controller).to receive(:current_user).and_return(user)
allow_any_instance_of(ApplicationController).to receive(:current_user).and_return(user)
end
subject { render_inline(described_class.new) }