summaryrefslogtreecommitdiff
path: root/spec/models/project_label_spec.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-17 17:48:46 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 14:58:27 -0200
commit8379fbcd47930320bf4dd6a3ac41c6efd427a91a (patch)
treec7f2f16f69032ae1584837c203d003c6b756ba25 /spec/models/project_label_spec.rb
parentd3b76e832f0afc38e2d0ffdff540c708a74ac26c (diff)
downloadgitlab-ce-8379fbcd47930320bf4dd6a3ac41c6efd427a91a.tar.gz
Add subject to group and projects labels which return group/project
Diffstat (limited to 'spec/models/project_label_spec.rb')
-rw-r--r--spec/models/project_label_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/project_label_spec.rb b/spec/models/project_label_spec.rb
index cd4732fb737..18c9d449ee5 100644
--- a/spec/models/project_label_spec.rb
+++ b/spec/models/project_label_spec.rb
@@ -64,6 +64,14 @@ describe ProjectLabel, models: true do
end
end
+ describe '#subject' do
+ it 'aliases project to subject' do
+ subject = described_class.new(project: build(:empty_project))
+
+ expect(subject.subject).to be(subject.project)
+ end
+ end
+
describe '#to_reference' do
let(:label) { create(:label) }