about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authortrwnh <a@trwnh.com>2019-05-19 15:51:44 -0500
committerEugen Rochko <eugen@zeonfederated.com>2019-05-19 22:51:44 +0200
commita6caf919e2d766bb924992943946cba915b17036 (patch)
tree85d17b0f679cba89b75a3266f87f499cae371584 /spec
parentae1838655876363065dd062a21064d385a90eb33 (diff)
Change bio limit from 160 to 500 (#10790)
* Change note_length validator from 160 to 500

* Change input maxlength from 160 to 500

* update bio test from 160 to 500

* Multiply a string 30 times instead of 10
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/api/v1/accounts/credentials_controller_spec.rb2
-rw-r--r--spec/models/account_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/controllers/api/v1/accounts/credentials_controller_spec.rb b/spec/controllers/api/v1/accounts/credentials_controller_spec.rb
index 727669886..19ac32612 100644
--- a/spec/controllers/api/v1/accounts/credentials_controller_spec.rb
+++ b/spec/controllers/api/v1/accounts/credentials_controller_spec.rb
@@ -61,7 +61,7 @@ describe Api::V1::Accounts::CredentialsController do
 
       describe 'with invalid data' do
         before do
-          patch :update, params: { note: 'This is too long. ' * 10 }
+          patch :update, params: { note: 'This is too long. ' * 30 }
         end
 
         it 'returns http unprocessable entity' do
diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb
index 46886b91f..719e01de7 100644
--- a/spec/models/account_spec.rb
+++ b/spec/models/account_spec.rb
@@ -601,8 +601,8 @@ RSpec.describe Account, type: :model do
         expect(account).to model_have_error_on_field(:display_name)
       end
 
-      it 'is invalid if the note is longer than 160 characters' do
-        account = Fabricate.build(:account, note: Faker::Lorem.characters(161))
+      it 'is invalid if the note is longer than 500 characters' do
+        account = Fabricate.build(:account, note: Faker::Lorem.characters(501))
         account.valid?
         expect(account).to model_have_error_on_field(:note)
       end