Commit 5210778d authored by Douwe Maan's avatar Douwe Maan

Fix specs.

parent 6960e83b
require 'spec_helper'
describe Issues::CloseService do
let(:project) { create(:empty_project) }
let(:user) { create(:user) }
let(:user2) { create(:user) }
let(:issue) { create(:issue, assignee: user2) }
let(:project) { issue.project }
before do
project.team << [user, :master]
......
require 'spec_helper'
describe Issues::UpdateService do
let(:project) { create(:empty_project) }
let(:user) { create(:user) }
let(:user2) { create(:user) }
let(:issue) { create(:issue) }
let(:label) { create(:label) }
let(:project) { issue.project }
before do
project.team << [user, :master]
......
......@@ -31,7 +31,8 @@ describe NotificationService do
describe 'Notes' do
context 'issue note' do
let(:issue) { create(:issue, assignee: create(:user)) }
let(:project) { create(:empty_project, :public) }
let(:issue) { create(:issue, project: project, assignee: create(:user)) }
let(:mentioned_issue) { create(:issue, assignee: issue.assignee) }
let(:note) { create(:note_on_issue, noteable: issue, project_id: issue.project_id, note: '@mention referenced') }
......@@ -101,7 +102,8 @@ describe NotificationService do
end
context 'issue note mention' do
let(:issue) { create(:issue, assignee: create(:user)) }
let(:project) { create(:empty_project, :public) }
let(:issue) { create(:issue, project: project, assignee: create(:user)) }
let(:mentioned_issue) { create(:issue, assignee: issue.assignee) }
let(:note) { create(:note_on_issue, noteable: issue, project_id: issue.project_id, note: '@all mentioned') }
......@@ -145,7 +147,8 @@ describe NotificationService do
end
context 'commit note' do
let(:note) { create(:note_on_commit) }
let(:project) { create(:project, :public) }
let(:note) { create(:note_on_commit, project: project) }
before do
build_team(note.project)
......@@ -192,7 +195,8 @@ describe NotificationService do
end
describe 'Issues' do
let(:issue) { create :issue, assignee: create(:user), description: 'cc @participant' }
let(:project) { create(:empty_project, :public) }
let(:issue) { create :issue, project: project, assignee: create(:user), description: 'cc @participant' }
before do
build_team(issue.project)
......@@ -295,7 +299,8 @@ describe NotificationService do
end
describe 'Merge Requests' do
let(:merge_request) { create :merge_request, assignee: create(:user) }
let(:project) { create(:project, :public) }
let(:merge_request) { create :merge_request, source_project: project, assignee: create(:user) }
before do
build_team(merge_request.target_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