diff options
author | Mark Fletcher <mark@gitlab.com> | 2019-03-26 16:47:54 +0300 |
---|---|---|
committer | Mark Fletcher <mark@gitlab.com> | 2019-03-26 19:50:14 +0300 |
commit | d97d35d3da48493189c3c0017198b19d3f91cf9a (patch) | |
tree | 2426b2cc2e2ea2b139560179ed473dfbe825cf9e /spec/features/milestone_spec.rb | |
parent | 30479246ed4ed2cdbadb4d359a38e592ffef2fe5 (diff) |
Fix bug when reopening milestone from index page
Diffstat (limited to 'spec/features/milestone_spec.rb')
-rw-r--r-- | spec/features/milestone_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/features/milestone_spec.rb b/spec/features/milestone_spec.rb index 6e349395017..adac59b89ef 100644 --- a/spec/features/milestone_spec.rb +++ b/spec/features/milestone_spec.rb @@ -122,4 +122,32 @@ describe 'Milestone' do expect(page).to have_selector('.popover') end end + + describe 'reopen closed milestones' do + before do + create(:milestone, :closed, project: project) + end + + describe 'group milestones page' do + it 'reopens the milestone' do + visit group_milestones_path(group, { state: 'closed' }) + + click_link 'Reopen Milestone' + + expect(page).not_to have_selector('.status-box-closed') + expect(page).to have_selector('.status-box-open') + end + end + + describe 'project milestones page' do + it 'reopens the milestone' do + visit project_milestones_path(project, { state: 'closed' }) + + click_link 'Reopen Milestone' + + expect(page).not_to have_selector('.status-box-closed') + expect(page).to have_selector('.status-box-open') + end + end + end end |