Enable RSpec/MessageExpectation cop & fix issues

There was 34 `allow` occurences and 17 `expect` occurences, so to be consistent `allow` form was chosen.

Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageExpectation
This commit is contained in:
Bertocq
2018-01-07 16:31:01 +01:00
parent 987b31d618
commit c4aa2d7093
9 changed files with 22 additions and 19 deletions

View File

@@ -47,13 +47,13 @@ describe ManagerAuthenticator do
it 'calls the verification user method' do
message = { ub: {user_key: "31415926", date: "20151031135905"} }
allow(authenticator).to receive(:application_authorized?).and_return(true)
expect(authenticator.send(:client)).to receive(:call).with(:get_status_user_data, message: message)
allow(authenticator.send(:client)).to receive(:call).with(:get_status_user_data, message: message)
authenticator.auth
end
it 'calls the permissions check method' do
allow(authenticator).to receive(:manager_exists?).and_return(true)
expect(authenticator.send(:client)).to receive(:call).with(:get_applications_user_list, message: { ub: {user_key: "31415926"} })
allow(authenticator.send(:client)).to receive(:call).with(:get_applications_user_list, message: { ub: {user_key: "31415926"} })
authenticator.auth
end
end