Commit d52af8b1 authored by Mark Chao's avatar Mark Chao

Fix spec in EE which now trigger access to repository

parent 67b579c5
require 'spec_helper' require 'spec_helper'
describe Projects::MilestonesController do describe Projects::MilestonesController do
let(:project) { create(:project) } let(:project) { create(:project, :repository) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:milestone) { create(:milestone, project: project) } let(:milestone) { create(:milestone, project: project) }
let(:issue) { create(:issue, project: project, milestone: milestone) } let(:issue) { create(:issue, project: project, milestone: milestone) }
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
describe Issuable::BulkUpdateService do describe Issuable::BulkUpdateService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, namespace: user.namespace) } let(:project) { create(:project, :repository, namespace: user.namespace) }
def bulk_update(issuables, extra_params = {}) def bulk_update(issuables, extra_params = {})
bulk_update_params = extra_params bulk_update_params = extra_params
......
...@@ -593,8 +593,8 @@ describe MergeRequests::UpdateService, :mailer do ...@@ -593,8 +593,8 @@ describe MergeRequests::UpdateService, :mailer do
end end
context 'setting `allow_collaboration`' do context 'setting `allow_collaboration`' do
let(:target_project) { create(:project, :public) } let(:target_project) { create(:project, :repository, :public) }
let(:source_project) { fork_project(target_project) } let(:source_project) { fork_project(target_project, nil, repository: true) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:merge_request) do let(:merge_request) do
create(:merge_request, create(:merge_request,
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
describe Milestones::DestroyService do describe Milestones::DestroyService do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project) } let(:project) { create(:project, :repository) }
let(:milestone) { create(:milestone, title: 'Milestone v1.0', project: project) } let(:milestone) { create(:milestone, title: 'Milestone v1.0', project: project) }
before do before do
......
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
describe Notes::QuickActionsService do describe Notes::QuickActionsService do
shared_context 'note on noteable' do shared_context 'note on noteable' do
let(:project) { create(:project) } let(:project) { create(:project, :repository) }
let(:maintainer) { create(:user).tap { |u| project.add_maintainer(u) } } let(:maintainer) { create(:user).tap { |u| project.add_maintainer(u) } }
let(:assignee) { create(:user) } let(:assignee) { create(:user) }
......
...@@ -10,7 +10,7 @@ describe TodoService do ...@@ -10,7 +10,7 @@ describe TodoService do
let(:john_doe) { create(:user) } let(:john_doe) { create(:user) }
let(:skipped) { create(:user) } let(:skipped) { create(:user) }
let(:skip_users) { [skipped] } let(:skip_users) { [skipped] }
let(:project) { create(:project) } let(:project) { create(:project, :repository) }
let(:mentions) { 'FYI: ' + [author, assignee, john_doe, member, guest, non_member, admin, skipped].map(&:to_reference).join(' ') } let(:mentions) { 'FYI: ' + [author, assignee, john_doe, member, guest, non_member, admin, skipped].map(&:to_reference).join(' ') }
let(:directly_addressed) { [author, assignee, john_doe, member, guest, non_member, admin, skipped].map(&:to_reference).join(' ') } let(:directly_addressed) { [author, assignee, john_doe, member, guest, non_member, admin, skipped].map(&:to_reference).join(' ') }
let(:directly_addressed_and_mentioned) { member.to_reference + ", what do you think? cc: " + [guest, admin, skipped].map(&:to_reference).join(' ') } let(:directly_addressed_and_mentioned) { member.to_reference + ", what do you think? cc: " + [guest, admin, skipped].map(&:to_reference).join(' ') }
......
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