diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-05-09 09:40:09 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-05-21 03:16:23 -0500 |
commit | e85b8af05183d1048adc4a39bc3d975af153463d (patch) | |
tree | 0cda58965ce9c8104cd65a6761678f2154bacd08 /spec/models | |
parent | 66886d4367b64d6860c55ab6f8a57a31ed9b59de (diff) |
Second round of Rspec fixes.
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/account_spec.rb | 18 | ||||
-rw-r--r-- | spec/models/report_spec.rb | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb index 8167e3a91..6753b7ef0 100644 --- a/spec/models/account_spec.rb +++ b/spec/models/account_spec.rb @@ -379,10 +379,10 @@ RSpec.describe Account, type: :model do expect(results).to eq [match] end - it 'limits by 10 by default' do - 11.times.each { Fabricate(:account, display_name: "Display Name") } + it 'limits by 15 by default' do + 16.times.each { Fabricate(:account, display_name: "Display Name") } results = Account.search_for("display") - expect(results.size).to eq 10 + expect(results.size).to eq 15 end it 'accepts arbitrary limits' do @@ -582,20 +582,20 @@ RSpec.describe Account, type: :model do expect(account).to model_have_error_on_field(:username) end - it 'is invalid if the username is longer then 30 characters' do - account = Fabricate.build(:account, username: Faker::Lorem.characters(31)) + it 'is invalid if the username is longer then 66 characters' do + account = Fabricate.build(:account, username: Faker::Lorem.characters(67)) account.valid? expect(account).to model_have_error_on_field(:username) end - it 'is invalid if the display name is longer than 30 characters' do - account = Fabricate.build(:account, display_name: Faker::Lorem.characters(31)) + it 'is invalid if the display name is longer than 66 characters' do + account = Fabricate.build(:account, display_name: Faker::Lorem.characters(67)) account.valid? expect(account).to model_have_error_on_field(:display_name) end - it 'is invalid if the note is longer than 500 characters' do - account = Fabricate.build(:account, note: Faker::Lorem.characters(501)) + it 'is invalid if the note is longer than 6666 characters' do + account = Fabricate.build(:account, note: Faker::Lorem.characters(6667)) account.valid? expect(account).to model_have_error_on_field(:note) end diff --git a/spec/models/report_spec.rb b/spec/models/report_spec.rb index a0cd0800d..ff2ae770c 100644 --- a/spec/models/report_spec.rb +++ b/spec/models/report_spec.rb @@ -124,8 +124,8 @@ describe Report do expect(report).to be_valid end - it 'is invalid if comment is longer than 1000 characters' do - report = Fabricate.build(:report, comment: Faker::Lorem.characters(1001)) + it 'is invalid if comment is longer than 6666 characters' do + report = Fabricate.build(:report, comment: Faker::Lorem.characters(6667)) report.valid? expect(report).to model_have_error_on_field(:comment) end |