diff options
author | Starfall <us@starfall.systems> | 2023-04-14 19:22:47 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2023-04-14 19:22:47 -0500 |
commit | 4fe1689de43f4404eb9530fcfbcbfb26d6c1c13a (patch) | |
tree | 6811b845bb7f4966b10dcefa3dea404246f161c7 /spec/validators/status_length_validator_spec.rb | |
parent | 65c1e53a32cabcdbb7bca57002bb0f6acdebe07e (diff) | |
parent | bed63f6dae0879ac840066b031229e0d139089cd (diff) |
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) |