Skip to content

Commit

Permalink
Adapt testcase for pundit
Browse files Browse the repository at this point in the history
  • Loading branch information
vpereira committed Sep 19, 2018
1 parent 3ed2f97 commit 56874af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/spec/controllers/webui/package_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -901,8 +901,8 @@ def remove_file_post
post :save_meta, params: { project: source_project, package: 'blah', meta: valid_meta }
end

it { expect(flash[:error]).to eq("Error while saving the Meta file: Package doesn't exists in that project..") }
it { expect(response).to have_http_status(:bad_request) }
it { expect(flash[:error]).to eq("Package \"blah\" not found in project \"#{source_project.name}\"") }
it { expect(response).to redirect_to(project_show_path(project: source_project, nextstatus: 404)) }
end

context 'when connection with the backend fails' do
Expand Down

0 comments on commit 56874af

Please sign in to comment.