summaryrefslogtreecommitdiff
path: root/spec/models/user_spec.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-12-02 13:54:57 +0100
committerRémy Coutable <remy@rymai.me>2016-12-06 10:23:17 +0100
commit4e249d5baea99a52915025fc2827d01ab2d77c18 (patch)
tree98a0eaa592fdb17657e10a6cd9fe941b17c0253d /spec/models/user_spec.rb
parent90c0f610e29976608dbfeeb63bc4763982c5dbc3 (diff)
downloadgitlab-ce-4e249d5baea99a52915025fc2827d01ab2d77c18.tar.gz
Use :maximum instead of :within for length validators with a 0..N range25209-improve-length-validators
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r--spec/models/user_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 14c891994d0..95fe2dc65d9 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -79,7 +79,7 @@ describe User, models: true do
it { is_expected.to allow_value(0).for(:projects_limit) }
it { is_expected.not_to allow_value(-1).for(:projects_limit) }
- it { is_expected.to validate_length_of(:bio).is_within(0..255) }
+ it { is_expected.to validate_length_of(:bio).is_at_most(255) }
it_behaves_like 'an object with email-formated attributes', :email do
subject { build(:user) }