diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-07-25 15:52:18 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-07-25 15:52:18 +0300 |
commit | 80c22e4c09d7808d2a971c78a6232d4843c8c4f7 (patch) | |
tree | a7b40a10b9e28b85566b7e1cf0329d8258388a53 /spec/features/projects/branches | |
parent | fcb560f4bf5fdc606a962503bd2a061f138c162b (diff) |
Add four features tests for download buttons in different places
Diffstat (limited to 'spec/features/projects/branches')
-rw-r--r-- | spec/features/projects/branches/download_buttons_spec.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/spec/features/projects/branches/download_buttons_spec.rb b/spec/features/projects/branches/download_buttons_spec.rb new file mode 100644 index 00000000000..d3f53b65699 --- /dev/null +++ b/spec/features/projects/branches/download_buttons_spec.rb @@ -0,0 +1,37 @@ +require 'spec_helper' + +feature 'Download buttons in branches page', feature: true do + given(:user) { create(:user) } + given(:role) { :developer } + given(:status) { 'success' } + given(:project) { create(:project) } + given(:pipeline) do + create(:ci_pipeline, project: project, + sha: project.commit.sha, + ref: project.default_branch, + status: status) + end + given!(:build) do + create(:ci_build, :success, :artifacts, + pipeline: pipeline, + status: pipeline.status, + name: 'build') + end + + background do + login_as(user) + project.team << [user, role] + end + + describe 'when checking branches' do + context 'with artifacts' do + before do + visit namespace_project_branches_path(project.namespace, project) + end + + scenario 'shows download artifacts button' do + expect(page).to have_link "Download '#{build.name}'" + end + end + end +end |