Skip to content
Snippets Groups Projects
Commit 1fb9de2b authored by blackst0ne's avatar blackst0ne
Browse files

Change Done column to Closed in issue boards

parent 6eeba4b1
No related branches found
No related tags found
1 merge request!10198Change Done column to Closed in issue boards
Loading
Loading
@@ -15,7 +15,7 @@ describe Boards::CreateService, services: true do
board = service.execute
 
expect(board.lists.size).to eq 1
expect(board.lists.first).to be_done
expect(board.lists.first).to be_closed
end
end
 
Loading
Loading
Loading
Loading
@@ -15,7 +15,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) }
let!(:done) { create(:done_list, board: board) }
let!(:closed) { create(:closed_list, board: board) }
 
let!(:opened_issue1) { create(:labeled_issue, project: project, labels: [bug]) }
let!(:opened_issue2) { create(:labeled_issue, project: project, labels: [p2]) }
Loading
Loading
@@ -53,8 +53,8 @@ describe Boards::Issues::ListService, services: true do
expect(issues).to eq [opened_issue2, reopened_issue1, opened_issue1]
end
 
it 'returns closed issues when listing issues from Done' do
params = { board_id: board.id, id: done.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
 
Loading
Loading
Loading
Loading
@@ -12,7 +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) }
let!(:done) { create(:done_list, board: board1) }
let!(:closed) { create(:closed_list, board: board1) }
 
before do
project.team << [user, :developer]
Loading
Loading
@@ -35,13 +35,13 @@ describe Boards::Issues::MoveService, services: true do
end
end
 
context 'when moving to done' do
context 'when moving to closed' do
let(:board2) { create(:board, project: project) }
let(:regression) { create(:label, project: project, name: 'Regression') }
let!(:list3) { create(:list, board: board2, label: regression, position: 1) }
 
let(:issue) { create(:labeled_issue, project: project, labels: [bug, development, testing, regression]) }
let(:params) { { board_id: board1.id, from_list_id: list2.id, to_list_id: done.id } }
let(:params) { { board_id: board1.id, from_list_id: list2.id, to_list_id: closed.id } }
 
it 'delegates the close proceedings to Issues::CloseService' do
expect_any_instance_of(Issues::CloseService).to receive(:execute).with(issue).once
Loading
Loading
@@ -58,9 +58,9 @@ describe Boards::Issues::MoveService, services: true do
end
end
 
context 'when moving from done' do
context 'when moving from closed' do
let(:issue) { create(:labeled_issue, :closed, project: project, labels: [bug]) }
let(:params) { { board_id: board1.id, from_list_id: done.id, to_list_id: list2.id } }
let(:params) { { board_id: board1.id, from_list_id: closed.id, to_list_id: list2.id } }
 
it 'delegates the re-open proceedings to Issues::ReopenService' do
expect_any_instance_of(Issues::ReopenService).to receive(:execute).with(issue).once
Loading
Loading
Loading
Loading
@@ -18,18 +18,18 @@ describe Boards::Lists::DestroyService, services: true do
development = create(:list, board: board, position: 0)
review = create(:list, board: board, position: 1)
staging = create(:list, board: board, position: 2)
done = board.done_list
closed = board.closed_list
 
described_class.new(project, user).execute(development)
 
expect(review.reload.position).to eq 0
expect(staging.reload.position).to eq 1
expect(done.reload.position).to be_nil
expect(closed.reload.position).to be_nil
end
end
 
it 'does not remove list from board when list type is done' do
list = board.done_list
it 'does not remove list from board when list type is closed' do
list = board.closed_list
service = described_class.new(project, user)
 
expect { service.execute(list) }.not_to change(board.lists, :count)
Loading
Loading
Loading
Loading
@@ -10,7 +10,7 @@ describe Boards::Lists::ListService, services: true do
 
service = described_class.new(project, double)
 
expect(service.execute(board)).to eq [list, board.done_list]
expect(service.execute(board)).to eq [list, board.closed_list]
end
end
end
Loading
Loading
@@ -10,7 +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) }
let!(:done) { create(:done_list, board: board) }
let!(:closed) { create(:closed_list, board: board) }
 
context 'when list type is set to label' do
it 'keeps position of lists when new position is nil' do
Loading
Loading
@@ -86,10 +86,10 @@ describe Boards::Lists::MoveService, services: true do
end
end
 
it 'keeps position of lists when list type is done' do
it 'keeps position of lists when list type is closed' do
service = described_class.new(project, user, position: 2)
 
service.execute(done)
service.execute(closed)
 
expect(current_list_positions).to eq [0, 1, 2, 3]
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment