Skip to content

Commit

Permalink
[ci] Add test for viewing packages that have a mime type like suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
bgeuken committed May 4, 2017
1 parent 08a4434 commit 2c76bb5
Show file tree
Hide file tree
Showing 2 changed files with 302 additions and 0 deletions.

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

9 changes: 9 additions & 0 deletions src/api/spec/features/webui/packages_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,21 @@
describe 'Viewing a package that' do
let(:branching_data) { BranchPackage.new(project: user.home_project.name, package: package.name).branch }
let(:branched_project) { Project.where(name: branching_data[:data][:targetproject]).first }
let(:package_mime) do
create(:package, name: 'test.json', project: user.home_project, description: 'A package with a mime type suffix')
end

before do
# Needed for branching
User.current = user
end

scenario "has a mime like suffix in it's name" do
visit package_show_path(project: user.home_project, package: package_mime)
expect(page).to have_text('test.json')
expect(page).to have_text('A package with a mime type suffix')
end

scenario 'was branched' do
visit package_show_path(project: branched_project, package: branched_project.packages.first)
expect(page).to have_text("Links to #{user.home_project} / #{package}")
Expand Down

0 comments on commit 2c76bb5

Please sign in to comment.