diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-07-09 19:27:31 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-07-09 19:27:31 +0300 |
commit | 630dfb41b8cd7acf0b39b06511f3a10485e751e8 (patch) | |
tree | deae00ad62dc0b82d8efee847bf4b877ab774f3c /spec | |
parent | 2a4039cf668c23156d49eae7f84837fb527f2549 (diff) | |
parent | bbc2ca40c2e1df0793c838d14ea3225a016fccbb (diff) |
Merge branch 'od/41671' into 'master'
Preserve the correct start/due dates on milestones when editing
Closes #41671
See merge request gitlab-org/gitlab-ce!20279
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/milestones/user_edits_milestone_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/features/milestones/user_edits_milestone_spec.rb b/spec/features/milestones/user_edits_milestone_spec.rb new file mode 100644 index 00000000000..077295f1cc0 --- /dev/null +++ b/spec/features/milestones/user_edits_milestone_spec.rb @@ -0,0 +1,22 @@ +require "rails_helper" + +describe "User edits milestone", :js do + set(:user) { create(:user) } + set(:project) { create(:project) } + set(:milestone) { create(:milestone, project: project, start_date: Date.today, due_date: 5.days.from_now) } + + before do + project.add_developer(user) + sign_in(user) + + visit(edit_project_milestone_path(project, milestone)) + end + + it "shows the right start date and due date" do + start_date = milestone.start_date.strftime("%F") + due_date = milestone.due_date.strftime("%F") + + expect(page).to have_field(with: start_date) + expect(page).to have_field(with: due_date) + end +end |