Add tests for Namespace#full_name method
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
78115dc13a
commit
f8a17a3835
1 changed files with 8 additions and 0 deletions
|
@ -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) }
|
||||
|
|
Loading…
Reference in a new issue