diff options
author | Arinde Eniola <eniolaarinde1@gmail.com> | 2016-04-26 12:22:52 +0100 |
---|---|---|
committer | Arinde Eniola <eniolaarinde1@gmail.com> | 2016-04-29 10:15:49 +0100 |
commit | ded3b02f3353708386d6960c5c146bf2a2de86db (patch) | |
tree | dff35fb04ff0565c09eeda4f4ca25b0bdccadb65 /spec/features/milestone_spec.rb | |
parent | 10f84f99cb663faae37139495f547bb68bd8aced (diff) | |
download | gitlab-ce-ded3b02f3353708386d6960c5c146bf2a2de86db.tar.gz |
Use a better message when milestone is newly createdchange_message_for_newly_created_milestone
make some changes for the checks to determine when the messages should be displayed
add item to changelog and also integration test
make some changes to the test
make some changes
Diffstat (limited to 'spec/features/milestone_spec.rb')
-rw-r--r-- | spec/features/milestone_spec.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/spec/features/milestone_spec.rb b/spec/features/milestone_spec.rb new file mode 100644 index 00000000000..c2c7acff3e8 --- /dev/null +++ b/spec/features/milestone_spec.rb @@ -0,0 +1,35 @@ +require 'rails_helper' + +feature 'Milestone', feature: true do + include WaitForAjax + + let(:project) { create(:project, :public) } + let(:user) { create(:user) } + let(:milestone) { create(:milestone, project: project, title: 8.7) } + + before do + project.team << [user, :master] + login_as(user) + end + + feature 'Create a milestone' do + scenario 'should show an informative message for a new issue' do + visit new_namespace_project_milestone_path(project.namespace, project) + page.within '.milestone-form' do + fill_in "milestone_title", with: '8.7' + end + find('input[name="commit"]').click + + expect(find('.alert-success')).to have_content('Assign some issues to this milestone.') + end + end + + feature 'Open a milestone with closed issues' do + scenario 'should show an informative message' do + create(:issue, title: "Bugfix1", project: project, milestone: milestone, state: "closed") + visit namespace_project_milestone_path(project.namespace, project, milestone) + + expect(find('.alert-success')).to have_content('All issues for this milestone are closed. You may close this milestone now.') + end + end +end |