diff options
Diffstat (limited to 'spec/features/milestone_spec.rb')
-rw-r--r-- | spec/features/milestone_spec.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/features/milestone_spec.rb b/spec/features/milestone_spec.rb index 2a1ea1a4e73..98d623902a5 100644 --- a/spec/features/milestone_spec.rb +++ b/spec/features/milestone_spec.rb @@ -23,11 +23,17 @@ RSpec.describe 'Milestone' do fill_in "milestone_due_date", with: '2016-12-16' end - find('input[name="commit"]').click + click_button 'Create milestone' expect(find('[data-testid="no-issues-alert"]')).to have_content('Assign some issues to this milestone.') expect(page).to have_content('Nov 16, 2016–Dec 16, 2016') end + + it 'passes redirect_path through to form' do + visit new_project_milestone_path(project, redirect_path: 'new_release') + + expect(find('#redirect_path', visible: :all)[:value]).to eq('new_release') + end end describe 'Open a milestone with closed issues' do @@ -49,7 +55,7 @@ RSpec.describe 'Milestone' do page.within '.milestone-form' do fill_in "milestone_title", with: milestone.title end - find('input[name="commit"]').click + click_button 'Create milestone' expect(find('.gl-alert-danger')).to have_content('already being used for another group or project milestone.') end @@ -62,7 +68,7 @@ RSpec.describe 'Milestone' do page.within '.milestone-form' do fill_in "milestone_title", with: milestone.title end - find('input[name="commit"]').click + click_button 'Create milestone' expect(find('.gl-alert-danger')).to have_content('already being used for another group or project milestone.') end |