Commit aaf65553 authored by Rémy Coutable's avatar Rémy Coutable

Resolve additional conflicts

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 3276ef44
......@@ -3,17 +3,9 @@ module Boards
def execute
board = project.boards.create(params)
<<<<<<< HEAD
if board.persisted?
board.lists.create(list_type: :done)
board.lists.create(list_type: :closed)
end
=======
private
def create_board!
board = project.boards.create
board.lists.create(list_type: :closed)
>>>>>>> ce/master
board
end
......
......@@ -18,11 +18,7 @@ describe Boards::Issues::ListService, services: true do
let!(:list1) { create(:list, board: board, label: development, position: 0) }
let!(:list2) { create(:list, board: board, label: testing, position: 1) }
<<<<<<< HEAD
let!(:done) { board.done_list }
=======
let!(:closed) { create(:closed_list, board: board) }
>>>>>>> ce/master
let!(:opened_issue1) { create(:labeled_issue, project: project, milestone: m1, title: 'Issue 1', labels: [bug]) }
let!(:opened_issue2) { create(:labeled_issue, project: project, milestone: m2, title: 'Issue 2', labels: [p2]) }
......@@ -62,15 +58,10 @@ describe Boards::Issues::ListService, services: true do
end
end
<<<<<<< HEAD
context 'when board have a milestone' do
it 'returns opened issues without board labels and milestone applied' do
params = { board_id: board.id }
board.update_attribute(:milestone, m1)
=======
it 'returns closed issues when listing issues from Closed' do
params = { board_id: board.id, id: closed.id }
>>>>>>> ce/master
issues = described_class.new(project, user, params).execute
......@@ -79,20 +70,30 @@ describe Boards::Issues::ListService, services: true do
end
end
it 'returns closed issues when listing issues from Done' do
params = { board_id: board.id, id: done.id }
context 'issues are ordered by priority' do
it 'returns opened issues when list_id is missing' do
params = { board_id: board.id }
issues = described_class.new(project, user, params).execute
issues = described_class.new(project, user, params).execute
expect(issues).to eq [closed_issue4, closed_issue2, closed_issue5, closed_issue3, closed_issue1]
end
expect(issues).to eq [opened_issue2, reopened_issue1, opened_issue1]
end
it 'returns opened issues that have label list applied when listing issues from a label list' do
params = { board_id: board.id, id: list1.id }
it 'returns closed issues when listing issues from Closed' do
params = { board_id: board.id, id: closed.id }
issues = described_class.new(project, user, params).execute
expect(issues).to eq [closed_issue4, closed_issue2, closed_issue5, closed_issue3, closed_issue1]
end
it 'returns opened issues that have label list applied when listing issues from a label list' do
params = { board_id: board.id, id: list1.id }
issues = described_class.new(project, user, params).execute
issues = described_class.new(project, user, params).execute
expect(issues).to eq [list1_issue3, list1_issue1, list1_issue2]
expect(issues).to eq [list1_issue3, list1_issue1, list1_issue2]
end
end
context 'with list that does not belong to the board' do
......
......@@ -12,11 +12,7 @@ describe Boards::Issues::MoveService, services: true do
let!(:list1) { create(:list, board: board1, label: development, position: 0) }
let!(:list2) { create(:list, board: board1, label: testing, position: 1) }
<<<<<<< HEAD
let!(:done) { board1.done_list }
=======
let!(:closed) { create(:closed_list, board: board1) }
>>>>>>> ce/master
before do
project.team << [user, :developer]
......
......@@ -10,11 +10,7 @@ describe Boards::Lists::MoveService, services: true do
let!(:development) { create(:list, board: board, position: 1) }
let!(:review) { create(:list, board: board, position: 2) }
let!(:staging) { create(:list, board: board, position: 3) }
<<<<<<< HEAD
let!(:done) { board.done_list }
=======
let!(:closed) { create(:closed_list, board: board) }
>>>>>>> ce/master
context 'when list type is set to label' do
it 'keeps position of lists when new position is nil' do
......
......@@ -11,11 +11,7 @@ describe MergeRequests::RefreshService, services: true do
group = create(:group)
group.add_owner(@user)
<<<<<<< HEAD
@project = create(:project, namespace: group, approvals_before_merge: 1, reset_approvals_on_push: true)
=======
@project = create(:project, :repository, namespace: group)
>>>>>>> ce/master
@project = create(:project, :repository, namespace: group, approvals_before_merge: 1, reset_approvals_on_push: true)
@fork_project = Projects::ForkService.new(@project, @user).execute
# The call to project.repository.after_import in RepositoryForkWorker does
# not reset the @exists variable of @fork_project.repository so we have to
......
require 'spec_helper'
describe TestHookService, services: true do
<<<<<<< HEAD
let(:user) { create :user }
let(:group) { create :group }
let(:project) { create :project, group: group }
let(:project) { create :project, :repository, group: group }
let(:project_hook) { create :project_hook, project: project }
let(:group_hook) { create :group_hook, group: group }
=======
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
let(:hook) { create(:project_hook, project: project) }
>>>>>>> ce/master
describe '#execute' do
it "successfully executes the project hook" do
......
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