fix a brittle stub
true is neither nil nor a user and doesn't make sense as the return value of `current_user`
This commit is contained in:
parent
f7a111e976
commit
a5c05544cf
1 changed files with 1 additions and 1 deletions
|
@ -436,7 +436,7 @@ describe API::Helpers, api: true do
|
|||
|
||||
context 'current_user is present' do
|
||||
before do
|
||||
expect_any_instance_of(self.class).to receive(:current_user).and_return(true)
|
||||
expect_any_instance_of(self.class).to receive(:current_user).at_least(:once).and_return(User.new)
|
||||
end
|
||||
|
||||
it 'does not raise an error' do
|
||||
|
|
Loading…
Reference in a new issue