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:
Diffstat (limited to 'spec/lib/gitlab/project_template_spec.rb')
-rw-r--r--spec/lib/gitlab/project_template_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/lib/gitlab/project_template_spec.rb b/spec/lib/gitlab/project_template_spec.rb
index 630369977ff..998fff12e94 100644
--- a/spec/lib/gitlab/project_template_spec.rb
+++ b/spec/lib/gitlab/project_template_spec.rb
@@ -12,6 +12,20 @@ RSpec.describe Gitlab::ProjectTemplate do
end
end
+ describe '#project_host' do
+ context "when `preview` is valid" do
+ subject { described_class.new('name', 'title', 'description', 'https://gitlab.com/some/project/path').project_host }
+
+ it { is_expected.to eq 'https://gitlab.com' }
+ end
+
+ context "when `preview` is `nil`" do
+ subject { described_class.new('name', 'title', 'description', nil).project_host }
+
+ it { is_expected.to eq nil }
+ end
+ end
+
describe '#project_path' do
subject { described_class.new('name', 'title', 'description', 'https://gitlab.com/some/project/path').project_path }