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
This commit is contained in:
trwnh 2019-05-19 15:51:44 -05:00 committed by Eugen Rochko
parent ae18386558
commit a6caf919e2
4 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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