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/models/project_spec.rb')
-rw-r--r--spec/models/project_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 7decc1bc911..635db5a73cb 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -2095,6 +2095,28 @@ describe Project do
end
end
+ describe '#uses_default_ci_config?' do
+ let(:project) { build(:project)}
+
+ it 'has a custom ci config path' do
+ project.ci_config_path = 'something_custom'
+
+ expect(project.uses_default_ci_config?).to be_falsey
+ end
+
+ it 'has a blank ci config path' do
+ project.ci_config_path = ''
+
+ expect(project.uses_default_ci_config?).to be_truthy
+ end
+
+ it 'does not have a custom ci config path' do
+ project.ci_config_path = nil
+
+ expect(project.uses_default_ci_config?).to be_truthy
+ end
+ end
+
describe '#latest_successful_build_for_ref' do
let(:project) { create(:project, :repository) }
let(:pipeline) { create_pipeline(project) }