summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Mazetto <gabriel@gitlab.com>2015-12-15 17:37:23 -0200
committerGabriel Mazetto <gabriel@gitlab.com>2015-12-15 17:37:23 -0200
commit907209821590efc34b11b60a042c6554bd11897f (patch)
tree281e4cf0ee88e12e58ddc1f210cd94390ff54312
parentf479ed306647bad84f3870f263f946646bb3f477 (diff)
downloadgitlab-ce-feature/update-rubocop.tar.gz
Fixed CiServices validationfeature/update-rubocop
-rw-r--r--app/models/project_services/bamboo_service.rb4
-rw-r--r--app/models/project_services/teamcity_service.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/app/models/project_services/bamboo_service.rb b/app/models/project_services/bamboo_service.rb
index 73f99b229f2..aa8746beb80 100644
--- a/app/models/project_services/bamboo_service.rb
+++ b/app/models/project_services/bamboo_service.rb
@@ -27,10 +27,10 @@ class BambooService < CiService
validates :build_key, presence: true, if: :activated?
validates :username,
presence: true,
- if: ->(service) { service.activated? && service.password? }
+ if: ->(service) { service.activated? && service.password }
validates :password,
presence: true,
- if: ->(service) { service.activated? && service.username? }
+ if: ->(service) { service.activated? && service.username }
attr_accessor :response
diff --git a/app/models/project_services/teamcity_service.rb b/app/models/project_services/teamcity_service.rb
index a2d55190de7..a63700693d7 100644
--- a/app/models/project_services/teamcity_service.rb
+++ b/app/models/project_services/teamcity_service.rb
@@ -27,10 +27,10 @@ class TeamcityService < CiService
validates :build_type, presence: true, if: :activated?
validates :username,
presence: true,
- if: ->(service) { service.activated? && service.password? }
+ if: ->(service) { service.activated? && service.password }
validates :password,
presence: true,
- if: ->(service) { service.activated? && service.username? }
+ if: ->(service) { service.activated? && service.username }
attr_accessor :response