Created
January 23, 2019 07:08
-
-
Save anaumov/420204dd06182c3a100858a591780c89 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let!(:user) { create :user } | |
before do | |
allow(User).to receive(:find).with(user.id).and_return(user) | |
end | |
it 'updates the user' do | |
expect(user).to receive(:update!).with(name: 'Alex') | |
post "/users/#{user.id}", params: { name: 'Alex' } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment