fix(spec): another way to mock current_user
This commit is contained in:
parent
560c2d763c
commit
f96347caad
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ RSpec.describe MainNavigation::AnnouncesLinkComponent, type: :component do
|
||||||
user.build_instructeur
|
user.build_instructeur
|
||||||
end
|
end
|
||||||
|
|
||||||
allow(controller).to receive(:current_user).and_return(user)
|
allow_any_instance_of(ApplicationController).to receive(:current_user).and_return(user)
|
||||||
end
|
end
|
||||||
|
|
||||||
subject { render_inline(described_class.new) }
|
subject { render_inline(described_class.new) }
|
||||||
|
|
Loading…
Add table
Reference in a new issue