diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-05 00:08:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-05 00:08:55 +0300 |
commit | 51612d3ef5be853289008694c40973b479e8547c (patch) | |
tree | 0a74213e94c9b6d81f6f0cb01e0b5dbff26f5444 /spec/models/project_spec.rb | |
parent | ca05512007cea51e05d3431b2c8bd7228c754370 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r-- | spec/models/project_spec.rb | 22 |
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) } |