2019-07-31 22:56:46 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
describe Boards::Lists::DestroyService do
|
2016-09-13 17:45:13 +05:30
|
|
|
describe '#execute' do
|
2018-03-27 19:54:05 +05:30
|
|
|
context 'when board parent is a project' do
|
|
|
|
let(:project) { create(:project) }
|
|
|
|
let(:board) { create(:board, project: project) }
|
|
|
|
let(:user) { create(:user) }
|
2016-09-13 17:45:13 +05:30
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
let(:parent) { project }
|
2016-09-13 17:45:13 +05:30
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
it_behaves_like 'lists destroy service'
|
2016-09-13 17:45:13 +05:30
|
|
|
end
|
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
context 'when board parent is a group' do
|
|
|
|
let(:group) { create(:group) }
|
|
|
|
let(:board) { create(:board, group: group) }
|
|
|
|
let(:user) { create(:user) }
|
|
|
|
|
|
|
|
let(:parent) { group }
|
2016-09-13 17:45:13 +05:30
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
it_behaves_like 'lists destroy service'
|
2016-09-13 17:45:13 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|