diff options
Diffstat (limited to 'spec/validators/status_length_validator_spec.rb')
-rw-r--r-- | spec/validators/status_length_validator_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/validators/status_length_validator_spec.rb b/spec/validators/status_length_validator_spec.rb index 4c80a59e6..7e06b9bd9 100644 --- a/spec/validators/status_length_validator_spec.rb +++ b/spec/validators/status_length_validator_spec.rb @@ -7,13 +7,13 @@ describe StatusLengthValidator do it 'does not add errors onto remote statuses' do status = double(local?: false) subject.validate(status) - expect(status).not_to receive(:errors) + expect(status).to_not receive(:errors) end it 'does not add errors onto local reblogs' do status = double(local?: false, reblog?: true) subject.validate(status) - expect(status).not_to receive(:errors) + expect(status).to_not receive(:errors) end it 'adds an error when content warning is over MAX_CHARS characters' do @@ -65,7 +65,7 @@ describe StatusLengthValidator do it 'counts only the front part of remote usernames' do username = '@alice' chars = StatusLengthValidator::MAX_CHARS - 1 - username.length - text = ('a' * 475) + " #{username}@#{'b' * 30}.com" + text = ('a' * chars) + " #{username}@#{'b' * 30}.com" status = double(spoiler_text: '', text: text, errors: double(add: nil), local?: true, reblog?: false) subject.validate(status) |