blob: 837635d49e854663bd6fb21d7624ecd3cf6a1cd0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Boards::Lists::DestroyService, feature_category: :team_planning do
let_it_be(:user) { create(:user) }
let(:list_type) { :list }
describe '#execute' do
context 'when board parent is a project' do
let_it_be(:project) { create(:project) }
let_it_be(:board) { create(:board, project: project) }
let_it_be(:list) { create(:list, board: board) }
let_it_be(:closed_list) { board.lists.closed.first }
let(:params) do
{ board: board }
end
let(:parent) { project }
it_behaves_like 'lists destroy service'
end
context 'when board parent is a group' do
let_it_be(:group) { create(:group) }
let_it_be(:board) { create(:board, group: group) }
let_it_be(:list) { create(:list, board: board) }
let_it_be(:closed_list) { board.lists.closed.first }
let(:params) do
{ board: board }
end
let(:parent) { group }
it_behaves_like 'lists destroy service'
end
end
end
|