diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-06-15 20:14:25 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-06-15 20:14:25 +0200 |
commit | d8670e114af1e21c48878afe8af16cc5628861fa (patch) | |
tree | c84b3fb5398b9629491ab30549a9cbd89b3495c3 /spec/features/builds_spec.rb | |
parent | 2d495fce529cc3ac15f7096ddf9962db0fbd1e23 (diff) | |
parent | 32a5ff70d771e7bff4e5c7b42fe95a966fa47a96 (diff) | |
download | gitlab-ce-fix/status-of-pipeline-without-builds.tar.gz |
Merge branch 'master' into fix/status-of-pipeline-without-buildsfix/status-of-pipeline-without-builds
* master: (198 commits)
Set inverse_of for Project/Services relation
Fix admin hooks spec
Prevent default disabled buttons and links.
Add index on `requested_at` to the `members` table
Rearrange order of tabs
Fix admin active tab tests
Show created_at in table column
Nest li elements directly under ul
Move builds tab to admin overview
Add monitoring link with subtabs
Add sub links to overview
Add counter for abuse reports
Remove admin layout-nav counters
Move admin nav to horizontal layout nav
Eager load project relations in IssueParser
Use validate and required for environment and project
Award Emoji can't be awarded on system notes backend
Get rid of Gitlab::ShellEnv
Update CHANGELOG.
Fix project star tooltip on the fly.
...
Conflicts:
app/services/ci/create_builds_service.rb
Diffstat (limited to 'spec/features/builds_spec.rb')
-rw-r--r-- | spec/features/builds_spec.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/spec/features/builds_spec.rb b/spec/features/builds_spec.rb index b8ecc356b4d..16832c297ac 100644 --- a/spec/features/builds_spec.rb +++ b/spec/features/builds_spec.rb @@ -97,6 +97,42 @@ describe "Builds" do end end + context 'Artifacts expire date' do + before do + @build.update_attributes(artifacts_file: artifacts_file, artifacts_expire_at: expire_at) + visit namespace_project_build_path(@project.namespace, @project, @build) + end + + context 'no expire date defined' do + let(:expire_at) { nil } + + it 'does not have the Keep button' do + expect(page).not_to have_content 'Keep' + end + end + + context 'when expire date is defined' do + let(:expire_at) { Time.now + 7.days } + + it 'keeps artifacts when Keep button is clicked' do + expect(page).to have_content 'The artifacts will be removed' + click_link 'Keep' + + expect(page).not_to have_link 'Keep' + expect(page).not_to have_content 'The artifacts will be removed' + end + end + + context 'when artifacts expired' do + let(:expire_at) { Time.now - 7.days } + + it 'does not have the Keep button' do + expect(page).to have_content 'The artifacts were removed' + expect(page).not_to have_link 'Keep' + end + end + end + context 'Build raw trace' do before do @build.run! |