GitLab steht aufgrund wichtiger Wartungsarbeiten am Montag, den 8. März, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Remove label_list factory

parent 4b75c750
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
factory :list do factory :list do
board board
label label
list_type :label
sequence(:position)
end end
factory :backlog_list, parent: :list do factory :backlog_list, parent: :list do
...@@ -10,11 +12,6 @@ ...@@ -10,11 +12,6 @@
position nil position nil
end end
factory :label_list, parent: :list do
list_type :label
sequence(:position)
end
factory :done_list, parent: :list do factory :done_list, parent: :list do
list_type :done list_type :done
label nil label nil
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
describe '#destroy' do describe '#destroy' do
it 'can be destroyed when when list_type is set to label' do it 'can be destroyed when when list_type is set to label' do
subject = create(:label_list) subject = create(:list)
expect(subject.destroy).to be_truthy expect(subject.destroy).to be_truthy
end end
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
let(:testing) { create(:label, project: project, name: 'Testing') } let(:testing) { create(:label, project: project, name: 'Testing') }
let(:backlog) { create(:backlog_list, board: board) } let(:backlog) { create(:backlog_list, board: board) }
let(:list1) { create(:label_list, board: board, label: development) } let(:list1) { create(:list, board: board, label: development) }
let(:list2) { create(:label_list, board: board, label: testing) } let(:list2) { create(:list, board: board, label: testing) }
let(:done) { create(:done_list, board: board) } let(:done) { create(:done_list, board: board) }
before do before do
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
context 'when board lists has only labels lists' do context 'when board lists has only labels lists' do
it 'creates a new list at end of the lists' do it 'creates a new list at end of the lists' do
create(:label_list, board: board, position: 1) create(:list, board: board, position: 1)
create(:label_list, board: board, position: 2) create(:list, board: board, position: 2)
list = described_class.new(project, label_id: label.id).execute list = described_class.new(project, label_id: label.id).execute
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
it 'creates a new list at end of the label lists' do it 'creates a new list at end of the label lists' do
create(:backlog_list, board: board) create(:backlog_list, board: board)
create(:done_list, board: board) create(:done_list, board: board)
list1 = create(:label_list, board: board, position: 1) list1 = create(:list, board: board, position: 1)
list2 = described_class.new(project, label_id: label.id).execute list2 = described_class.new(project, label_id: label.id).execute
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
context 'when list type is label' do context 'when list type is label' do
it 'removes list from board' do it 'removes list from board' do
list = create(:label_list, board: board) list = create(:list, board: board)
service = described_class.new(project, list_id: list.id) service = described_class.new(project, list_id: list.id)
expect { service.execute }.to change(board.lists, :count).by(-1) expect { service.execute }.to change(board.lists, :count).by(-1)
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
it 'decrements position of higher lists' do it 'decrements position of higher lists' do
backlog = create(:backlog_list, board: board) backlog = create(:backlog_list, board: board)
development = create(:label_list, board: board, position: 1) development = create(:list, board: board, position: 1)
review = create(:label_list, board: board, position: 2) review = create(:list, board: board, position: 2)
staging = create(:label_list, board: board, position: 3) staging = create(:list, board: board, position: 3)
done = create(:done_list, board: board) done = create(:done_list, board: board)
described_class.new(project, list_id: development.id).execute described_class.new(project, list_id: development.id).execute
......
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
let(:board) { project.board } let(:board) { project.board }
let!(:backlog) { create(:backlog_list, board: board) } let!(:backlog) { create(:backlog_list, board: board) }
let!(:planning) { create(:label_list, board: board, position: 1) } let!(:planning) { create(:list, board: board, position: 1) }
let!(:development) { create(:label_list, board: board, position: 2) } let!(:development) { create(:list, board: board, position: 2) }
let!(:review) { create(:label_list, board: board, position: 3) } let!(:review) { create(:list, board: board, position: 3) }
let!(:staging) { create(:label_list, board: board, position: 4) } let!(:staging) { create(:list, board: board, position: 4) }
let!(:done) { create(:done_list, board: board) } let!(:done) { create(:done_list, board: board) }
context 'when list type is set to label' do context 'when list type is set to label' do
it 'keeps position of lists when new position is nil' do it 'keeps position of lists when new position is nil' 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