debian-mirror-gitlab/spec/features/milestones/user_edits_milestone_spec.rb

25 lines
679 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2019-12-04 20:38:33 +05:30
require 'spec_helper'
2018-11-18 11:00:15 +05:30
describe "User edits milestone", :js do
2020-04-08 14:13:33 +05:30
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) }
let_it_be(:milestone) { create(:milestone, project: project, start_date: Date.today, due_date: 5.days.from_now) }
2018-11-18 11:00:15 +05:30
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