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
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-14 03:06:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-14 03:06:38 +0300
commit7ea2b8726c5c587e32d53efd5d9c84cd72ba4356 (patch)
tree79625bb280020ffad5c92b394b401f8a22d0b202 /spec
parent336e1756be5b6ee624f7e4b5f740a434f05f8e94 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/validators/branch_filter_validator_spec.rb16
-rw-r--r--spec/validators/js_regex_validator_spec.rb2
-rw-r--r--spec/validators/namespace_path_validator_spec.rb4
-rw-r--r--spec/validators/project_path_validator_spec.rb4
-rw-r--r--spec/validators/public_url_validator_spec.rb2
-rw-r--r--spec/validators/variable_duplicates_validator_spec.rb2
-rw-r--r--spec/validators/x509_certificate_credentials_validator_spec.rb2
7 files changed, 23 insertions, 9 deletions
diff --git a/spec/validators/branch_filter_validator_spec.rb b/spec/validators/branch_filter_validator_spec.rb
index 3be54827431..957d1dd99bb 100644
--- a/spec/validators/branch_filter_validator_spec.rb
+++ b/spec/validators/branch_filter_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe BranchFilterValidator do
@@ -6,25 +8,25 @@ describe BranchFilterValidator do
describe '#validates_each' do
it 'allows valid branch names' do
- validator.validate_each(hook, :push_events_branch_filter, "good_branch_name")
- validator.validate_each(hook, :push_events_branch_filter, "another/good_branch_name")
+ validator.validate_each(hook, :push_events_branch_filter, +"good_branch_name")
+ validator.validate_each(hook, :push_events_branch_filter, +"another/good_branch_name")
expect(hook.errors.empty?).to be true
end
it 'disallows bad branch names' do
- validator.validate_each(hook, :push_events_branch_filter, "bad branch~name")
+ validator.validate_each(hook, :push_events_branch_filter, +"bad branch~name")
expect(hook.errors[:push_events_branch_filter].empty?).to be false
end
it 'allows wildcards' do
- validator.validate_each(hook, :push_events_branch_filter, "features/*")
- validator.validate_each(hook, :push_events_branch_filter, "features/*/bla")
- validator.validate_each(hook, :push_events_branch_filter, "*-stable")
+ validator.validate_each(hook, :push_events_branch_filter, +"features/*")
+ validator.validate_each(hook, :push_events_branch_filter, +"features/*/bla")
+ validator.validate_each(hook, :push_events_branch_filter, +"*-stable")
expect(hook.errors.empty?).to be true
end
it 'gets rid of whitespace' do
- filter = ' master '
+ filter = +' master '
validator.validate_each(hook, :push_events_branch_filter, filter)
expect(filter).to eq 'master'
diff --git a/spec/validators/js_regex_validator_spec.rb b/spec/validators/js_regex_validator_spec.rb
index 4d3bafaf267..dcc5e7ed4e8 100644
--- a/spec/validators/js_regex_validator_spec.rb
+++ b/spec/validators/js_regex_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe JsRegexValidator do
diff --git a/spec/validators/namespace_path_validator_spec.rb b/spec/validators/namespace_path_validator_spec.rb
index 61e2845f35f..bc9834dbd2a 100644
--- a/spec/validators/namespace_path_validator_spec.rb
+++ b/spec/validators/namespace_path_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe NamespacePathValidator do
@@ -5,7 +7,7 @@ describe NamespacePathValidator do
describe '.valid_path?' do
it 'handles invalid utf8' do
- expect(described_class.valid_path?("a\0weird\255path")).to be_falsey
+ expect(described_class.valid_path?(+"a\0weird\255path")).to be_falsey
end
end
diff --git a/spec/validators/project_path_validator_spec.rb b/spec/validators/project_path_validator_spec.rb
index 8bb5e72dc22..d6046f7214b 100644
--- a/spec/validators/project_path_validator_spec.rb
+++ b/spec/validators/project_path_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe ProjectPathValidator do
@@ -5,7 +7,7 @@ describe ProjectPathValidator do
describe '.valid_path?' do
it 'handles invalid utf8' do
- expect(described_class.valid_path?("a\0weird\255path")).to be_falsey
+ expect(described_class.valid_path?(+"a\0weird\255path")).to be_falsey
end
end
diff --git a/spec/validators/public_url_validator_spec.rb b/spec/validators/public_url_validator_spec.rb
index 3cbf1002730..c81232d9b78 100644
--- a/spec/validators/public_url_validator_spec.rb
+++ b/spec/validators/public_url_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe PublicUrlValidator do
diff --git a/spec/validators/variable_duplicates_validator_spec.rb b/spec/validators/variable_duplicates_validator_spec.rb
index 0b71a67f94d..f48ebee7e0e 100644
--- a/spec/validators/variable_duplicates_validator_spec.rb
+++ b/spec/validators/variable_duplicates_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe VariableDuplicatesValidator do
diff --git a/spec/validators/x509_certificate_credentials_validator_spec.rb b/spec/validators/x509_certificate_credentials_validator_spec.rb
index 24ef68c1fab..2a5a322622f 100644
--- a/spec/validators/x509_certificate_credentials_validator_spec.rb
+++ b/spec/validators/x509_certificate_credentials_validator_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe X509CertificateCredentialsValidator do