diff options
Diffstat (limited to 'spec/lib/api/validations/validators')
-rw-r--r-- | spec/lib/api/validations/validators/email_or_email_list_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/api/validations/validators/git_ref_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/api/validations/validators/limit_spec.rb | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/spec/lib/api/validations/validators/email_or_email_list_spec.rb b/spec/lib/api/validations/validators/email_or_email_list_spec.rb index ac3111c2319..17cfdf93cdc 100644 --- a/spec/lib/api/validations/validators/email_or_email_list_spec.rb +++ b/spec/lib/api/validations/validators/email_or_email_list_spec.rb @@ -14,6 +14,7 @@ RSpec.describe API::Validations::Validators::EmailOrEmailList do expect_no_validation_error('test' => 'test@example.org') expect_no_validation_error('test' => 'test1@example.com,test2@example.org') expect_no_validation_error('test' => 'test1@example.com,test2@example.org,test3@example.co.uk') + expect_no_validation_error('test' => %w[test1@example.com test2@example.org test3@example.co.uk]) end end @@ -23,6 +24,7 @@ RSpec.describe API::Validations::Validators::EmailOrEmailList do expect_validation_error('test' => '@example.com') expect_validation_error('test' => 'test1@example.com,asdf') expect_validation_error('test' => 'asdf,testa1@example.com,asdf') + expect_validation_error('test' => %w[asdf testa1@example.com asdf]) end end end diff --git a/spec/lib/api/validations/validators/git_ref_spec.rb b/spec/lib/api/validations/validators/git_ref_spec.rb index 0d2d9e8f39a..6b9f5dee5fc 100644 --- a/spec/lib/api/validations/validators/git_ref_spec.rb +++ b/spec/lib/api/validations/validators/git_ref_spec.rb @@ -38,7 +38,7 @@ RSpec.describe API::Validations::Validators::GitRef do expect_validation_error('test' => 'heads/f[/bar') expect_validation_error('test' => "heads/foo\t") expect_validation_error('test' => "heads/foo\177") - expect_validation_error('test' => "#{'a' * 1025}") + expect_validation_error('test' => 'a' * 1025) expect_validation_error('test' => nil) expect_validation_error('test' => '') end diff --git a/spec/lib/api/validations/validators/limit_spec.rb b/spec/lib/api/validations/validators/limit_spec.rb index 0c10e2f74d2..11d808d390b 100644 --- a/spec/lib/api/validations/validators/limit_spec.rb +++ b/spec/lib/api/validations/validators/limit_spec.rb @@ -13,13 +13,13 @@ RSpec.describe API::Validations::Validators::Limit do it 'does not raise a validation error' do expect_no_validation_error('test' => '123-456') expect_no_validation_error('test' => '00000000-ffff-0000-ffff-000000000000') - expect_no_validation_error('test' => "#{'a' * 255}") + expect_no_validation_error('test' => 'a' * 255) end end context 'longer than limit param' do it 'raises a validation error' do - expect_validation_error('test' => "#{'a' * 256}") + expect_validation_error('test' => 'a' * 256) end end |