Last active
August 29, 2015 14:02
-
-
Save dennym/39eb93d045416c2dbaca 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
context 'something went wrong' do | |
it 'raises an exception and returns 422 Unprocessable Entity' do | |
@klass = controller.send(:base_class) | |
allow(@klass).to receive(:recover!).with(@organization.id).and_raise(::Extension::ActiveRecord::Paranoia::RecordNotRestored) | |
put :restore, format: :json, id: @organization.id | |
expect(response.status).to eq(422) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment