diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-09-06 21:00:34 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-09-06 21:00:34 +0200 |
commit | 632f6ba267bc09a658defc3721d2b52de05cf7e6 (patch) | |
tree | e486d01082cab7ba12cca31831fe6f6dd37f1d88 /app/models | |
parent | 5941f3a7e8628e8792c9dbfad07f9b4d6ba7fb2e (diff) | |
download | gitlab-ce-632f6ba267bc09a658defc3721d2b52de05cf7e6.tar.gz |
Add tests to cover all introduced changes
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/project.rb | 2 | ||||
-rw-r--r-- | app/models/project_auto_devops.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 541c950e369..b52b1e9049b 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1390,7 +1390,7 @@ class Project < ActiveRecord::Base end def has_ci? - @repository.gitlab_ci_yml || @project.auto_devops_enabled? + repository.gitlab_ci_yml || auto_devops_enabled? end def predefined_variables diff --git a/app/models/project_auto_devops.rb b/app/models/project_auto_devops.rb index c54e421957b..53731579e87 100644 --- a/app/models/project_auto_devops.rb +++ b/app/models/project_auto_devops.rb @@ -1,7 +1,7 @@ class ProjectAutoDevops < ActiveRecord::Base belongs_to :project - validates :domain, presence: true, hostname: { allow_numeric_hostname: true }, if: :enabled? + validates :domain, allow_blank: true, hostname: { allow_numeric_hostname: true } def variables variables = [] |