Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 22:00:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 22:00:14 +0300
commit05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch)
tree11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/models/bulk_imports/entity_spec.rb
parentec73467c23693d0db63a797d10194da9e72a74af (diff)
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/models/bulk_imports/entity_spec.rb')
-rw-r--r--spec/models/bulk_imports/entity_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/models/bulk_imports/entity_spec.rb b/spec/models/bulk_imports/entity_spec.rb
index f4f2b174a7b..b1c65c6b9ee 100644
--- a/spec/models/bulk_imports/entity_spec.rb
+++ b/spec/models/bulk_imports/entity_spec.rb
@@ -325,4 +325,24 @@ RSpec.describe BulkImports::Entity, type: :model do
expect(project_entity.update_service).to eq(::Projects::UpdateService)
end
end
+
+ describe '#full_path' do
+ it 'returns group full path for project entity' do
+ group_entity = build(:bulk_import_entity, :group_entity, group: build(:group))
+
+ expect(group_entity.full_path).to eq(group_entity.group.full_path)
+ end
+
+ it 'returns project full path for project entity' do
+ project_entity = build(:bulk_import_entity, :project_entity, project: build(:project))
+
+ expect(project_entity.full_path).to eq(project_entity.project.full_path)
+ end
+
+ it 'returns nil when not associated with group or project' do
+ entity = build(:bulk_import_entity, group: nil, project: nil)
+
+ expect(entity.full_path).to eq(nil)
+ end
+ end
end