Commit 29ba2e7da02b5bc196a6d7f7ebe165a4d48fa137
1 parent
7ad76c21
Exists in
colab
and in
4 other branches
Fixed unit tests for ResourceFinder that came from rebase
Showing
4 changed files
with
4 additions
and
4 deletions
Show diff stats
Gemfile.lock
app/controllers/concerns/resource_finder.rb
| ... | ... | @@ -4,7 +4,7 @@ module ResourceFinder |
| 4 | 4 | def find_resource(klass, id) |
| 5 | 5 | begin |
| 6 | 6 | klass.find(id) |
| 7 | - rescue KalibroGatekeeperClient::Errors::RecordNotFound | |
| 7 | + rescue KalibroClient::Errors::RecordNotFound | |
| 8 | 8 | respond_to do |format| |
| 9 | 9 | format.html { render file: "#{Rails.root}/public/404", layout: false, status: :not_found } |
| 10 | 10 | end | ... | ... |
spec/controllers/concerns/resource_finder_spec.rb
| ... | ... | @@ -24,7 +24,7 @@ describe ResourceFinder, type: :controller do |
| 24 | 24 | |
| 25 | 25 | context 'when the resource does not exists' do |
| 26 | 26 | before :each do |
| 27 | - klass.expects(:find).with(id).raises(KalibroGatekeeperClient::Errors::RecordNotFound) | |
| 27 | + klass.expects(:find).with(id).raises(KalibroClient::Errors::RecordNotFound) | |
| 28 | 28 | end |
| 29 | 29 | |
| 30 | 30 | # FIXME: this is not the best test, but it it's the closest we can think of | ... | ... |
spec/controllers/projects_controller_spec.rb
| ... | ... | @@ -75,7 +75,7 @@ describe ProjectsController, :type => :controller do |
| 75 | 75 | |
| 76 | 76 | context 'when the project does not exists' do |
| 77 | 77 | before :each do |
| 78 | - Project.expects(:find).with(project.id).raises(KalibroGatekeeperClient::Errors::RecordNotFound) | |
| 78 | + Project.expects(:find).with(project.id).raises(KalibroClient::Errors::RecordNotFound) | |
| 79 | 79 | get :show, :id => project.id |
| 80 | 80 | end |
| 81 | 81 | ... | ... |