diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2017-05-23 20:34:42 +0000 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2017-06-08 10:25:37 +0000 |
commit | 516fd01fd75ff45ea1f191eff007687db3ecf0b7 (patch) | |
tree | 86541eeba59ecedf0bfb3ff3e4f707fe972719b5 | |
parent | d9b4e4c8651367d13700eadeb5cedd6dd36db9f5 (diff) | |
download | gitlab-ce-516fd01fd75ff45ea1f191eff007687db3ecf0b7.tar.gz |
Merge branch '32509-next-run-in-pipeline-schedules-shows-past-time' into 'master'
Use #real_next_run in pipelines table
Closes #32509
See merge request !11660
-rw-r--r-- | app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml | 2 | ||||
-rw-r--r-- | spec/features/projects/pipeline_schedules_spec.rb | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml index 075ecee4343..2f686988cb5 100644 --- a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml +++ b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml @@ -15,7 +15,7 @@ None %td.next-run-cell - if pipeline_schedule.active? - = time_ago_with_tooltip(pipeline_schedule.next_run_at) + = time_ago_with_tooltip(pipeline_schedule.real_next_run) - else Inactive %td diff --git a/spec/features/projects/pipeline_schedules_spec.rb b/spec/features/projects/pipeline_schedules_spec.rb index 1211b17b3d8..a521222fc9c 100644 --- a/spec/features/projects/pipeline_schedules_spec.rb +++ b/spec/features/projects/pipeline_schedules_spec.rb @@ -5,7 +5,7 @@ feature 'Pipeline Schedules', :feature do include WaitForAjax let!(:project) { create(:project) } - let!(:pipeline_schedule) { create(:ci_pipeline_schedule, project: project) } + let!(:pipeline_schedule) { create(:ci_pipeline_schedule, :nightly, project: project ) } let!(:pipeline) { create(:ci_pipeline, pipeline_schedule: pipeline_schedule) } let(:scope) { nil } let!(:user) { create(:user) } @@ -32,6 +32,7 @@ feature 'Pipeline Schedules', :feature do it 'displays the required information description' do page.within('.pipeline-schedule-table-row') do expect(page).to have_content('pipeline schedule') + expect(page).to have_content(pipeline_schedule.real_next_run.strftime('%b %d, %Y')) expect(page).to have_link('master') expect(page).to have_link("##{pipeline.id}") end |