summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorHordur Freyr Yngvason <hfyngvason@gitlab.com>2019-08-15 20:20:08 +0000
committerMichael Kozono <mkozono@gmail.com>2019-08-15 20:20:08 +0000
commitd3c5ff7b723b9447e2b672fb844bb42dde687ac9 (patch)
treed2ab2578b099bed0363bed3f2dbec7b7155c01cd /spec/lib
parent44717d26847384fb6cb82e3ce54e831b37bdf1bc (diff)
downloadgitlab-ce-d3c5ff7b723b9447e2b672fb844bb42dde687ac9.tar.gz
Squash project templates on update
As per https://gitlab.com/gitlab-org/gitlab-ce/issues/46043, project templates should be squashed before updating, so that repositories created from these templates don't include the full history of the backing repository.
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/project_template_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/lib/gitlab/project_template_spec.rb b/spec/lib/gitlab/project_template_spec.rb
index 8b82ea7faa5..c7c82d07508 100644
--- a/spec/lib/gitlab/project_template_spec.rb
+++ b/spec/lib/gitlab/project_template_spec.rb
@@ -28,6 +28,18 @@ describe Gitlab::ProjectTemplate do
end
end
+ describe '#project_path' do
+ subject { described_class.new('name', 'title', 'description', 'https://gitlab.com/some/project/path').project_path }
+
+ it { is_expected.to eq 'some/project/path' }
+ end
+
+ describe '#uri_encoded_project_path' do
+ subject { described_class.new('name', 'title', 'description', 'https://gitlab.com/some/project/path').uri_encoded_project_path }
+
+ it { is_expected.to eq 'some%2Fproject%2Fpath' }
+ end
+
describe '.find' do
subject { described_class.find(query) }