Skip to content

Commit

Permalink
[ci] Add test for branching packages
Browse files Browse the repository at this point in the history
  • Loading branch information
bgeuken committed May 2, 2017
1 parent 0b735e3 commit 2bb898d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/api/spec/controllers/webui/package_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@
expect(response).to redirect_to(root_path)
end

it "shows an error if user has no permissions for source project" do
post :branch, params: { linked_project: source_project, linked_package: source_package, target_project: 'home:admin:nope' }
expect(flash[:error]).to eq("Sorry, you are not authorized to create this Project.")
expect(response).to redirect_to(root_path)
end

it "shows an error if source project parameter not provided" do
post :branch, params: { linked_package: source_package }
expect(flash[:error]).to eq("Failed to branch: Linked Project parameter missing")
Expand Down

0 comments on commit 2bb898d

Please sign in to comment.