summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-08-08 16:14:22 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-08-17 12:58:58 -0300
commite23d1706faa7fe100d5db3d2e4f83198f7bfa900 (patch)
tree61369a263a9949091532d5625d404fc43ce158d8 /spec
parent5317f6ea943c84ec0dc68a934f953e667fae1178 (diff)
downloadgitlab-ce-e23d1706faa7fe100d5db3d2e4f83198f7bfa900.tar.gz
Destroy related lists when a label is removed
Diffstat (limited to 'spec')
-rw-r--r--spec/models/label_spec.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/models/label_spec.rb b/spec/models/label_spec.rb
index 2a09063f857..5a5d1a5d60c 100644
--- a/spec/models/label_spec.rb
+++ b/spec/models/label_spec.rb
@@ -5,8 +5,10 @@ describe Label, models: true do
describe 'associations' do
it { is_expected.to belong_to(:project) }
+
it { is_expected.to have_many(:label_links).dependent(:destroy) }
it { is_expected.to have_many(:issues).through(:label_links).source(:target) }
+ it { is_expected.to have_many(:lists).dependent(:destroy) }
end
describe 'modules' do