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:
http://jneen.net/ 2017-03-01 11:39:18 -08:00
parent f7a111e976
commit a5c05544cf

View file

@ -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