Commit 86afc2e3 authored by Sean McGivern's avatar Sean McGivern

Merge branch '34609-fix-lazy-create-milestone-in-spec' into 'master'

Eagerly create a milestone that is used in a feature spec

Closes #34609

See merge request !12604
parents 959289d0 92702772
require 'rails_helper' require 'rails_helper'
feature 'Multiple issue updating from issues#index', feature: true do feature 'Multiple issue updating from issues#index', :js do
let!(:project) { create(:project) } let!(:project) { create(:project) }
let!(:issue) { create(:issue, project: project) } let!(:issue) { create(:issue, project: project) }
let!(:user) { create(:user)} let!(:user) { create(:user)}
before do before do
project.team << [user, :master] project.team << [user, :master]
gitlab_sign_in(user) sign_in(user)
end end
context 'status', js: true do context 'status' do
it 'sets to closed' do it 'sets to closed' do
visit namespace_project_issues_path(project.namespace, project) visit namespace_project_issues_path(project.namespace, project)
...@@ -37,7 +37,7 @@ feature 'Multiple issue updating from issues#index', feature: true do ...@@ -37,7 +37,7 @@ feature 'Multiple issue updating from issues#index', feature: true do
end end
end end
context 'assignee', js: true do context 'assignee' do
it 'updates to current user' do it 'updates to current user' do
visit namespace_project_issues_path(project.namespace, project) visit namespace_project_issues_path(project.namespace, project)
...@@ -67,8 +67,8 @@ feature 'Multiple issue updating from issues#index', feature: true do ...@@ -67,8 +67,8 @@ feature 'Multiple issue updating from issues#index', feature: true do
end end
end end
context 'milestone', js: true do context 'milestone' do
let(:milestone) { create(:milestone, project: project) } let!(:milestone) { create(:milestone, project: project) }
it 'updates milestone' do it 'updates milestone' do
visit namespace_project_issues_path(project.namespace, project) visit namespace_project_issues_path(project.namespace, project)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment