Skip to content

A platform for community discussion. Free, open, simple.

DEV: Improve spec to use the constant length

Robin Ward14ae574bc581
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index ffcd7cd1a01..cb79e3856d4 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -67,7 +67,7 @@ describe User do
end
it "doesn't raise an error if the name is longer than the max password length" do
- user.name = 'x' * 220
+ user.name = 'x' * (User.max_password_length + 1)
expect(user).to be_valid
end
end