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