diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb index 265ffc330e3..90e8f6b7227 100644 --- a/spec/models/namespace_spec.rb +++ b/spec/models/namespace_spec.rb @@ -133,6 +133,14 @@ describe Namespace, models: true do it { expect(nested_group.full_path).to eq("#{group.path}/#{nested_group.path}") } end + describe '#full_name' do + let(:group) { create(:group) } + let(:nested_group) { create(:group, parent: group) } + + it { expect(group.full_name).to eq(group.name) } + it { expect(nested_group.full_name).to eq("#{group.name} / #{nested_group.name}") } + end + describe '#parents' do let(:group) { create(:group) } let(:nested_group) { create(:group, parent: group) }