diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-07-20 16:23:40 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-07-20 16:23:40 +0900 |
commit | 92d9053a1edab94f56f6e653f26f19d37a8308c6 (patch) | |
tree | 68f6bcf791d3c7a2f0e3fdb2fc62cb10528f1491 /spec | |
parent | 1540cc434b66e32f723fff5de3fbc2f7e9480e0b (diff) | |
download | gitlab-ce-92d9053a1edab94f56f6e653f26f19d37a8308c6.tar.gz |
Add present?
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/projects/pipeline_schedules_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/features/projects/pipeline_schedules_spec.rb b/spec/features/projects/pipeline_schedules_spec.rb index 033ccf06124..de6dd8fc8a6 100644 --- a/spec/features/projects/pipeline_schedules_spec.rb +++ b/spec/features/projects/pipeline_schedules_spec.rb @@ -70,6 +70,17 @@ feature 'Pipeline Schedules', :feature, js: true do expect(first('.branch-name-cell').text).to eq('') end end + + context 'when ref is empty' do + before do + pipeline_schedule.update_attribute(:ref, '') + visit_pipelines_schedules + end + + it 'shows a list of the pipeline schedules with empty ref column' do + expect(first('.branch-name-cell').text).to eq('') + end + end end describe 'POST /projects/pipeline_schedules/new' do @@ -128,6 +139,19 @@ feature 'Pipeline Schedules', :feature, js: true do end end end + + context 'when ref is empty' do + before do + pipeline_schedule.update_attribute(:ref, '') + edit_pipeline_schedule + end + + it 'shows the pipeline schedule with default ref' do + page.within('.js-target-branch-dropdown') do + expect(first('.dropdown-toggle-text').text).to eq('master') + end + end + end end context 'when user creates a new pipeline schedule with variables' do |