Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArinde Eniola <eniolaarinde1@gmail.com>2016-04-26 14:22:52 +0300
committerArinde Eniola <eniolaarinde1@gmail.com>2016-04-29 12:15:49 +0300
commitded3b02f3353708386d6960c5c146bf2a2de86db (patch)
treedff35fb04ff0565c09eeda4f4ca25b0bdccadb65 /spec/features/milestone_spec.rb
parent10f84f99cb663faae37139495f547bb68bd8aced (diff)
Use a better message when milestone is newly created
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.rb35
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