Merge commit 'f476d9dab2f5cca6ae44b95961df6b6557d66dab' into glitch-soc/merge-upstream

Conflicts:
- `lib/sanitize_ext/sanitize_config.rb`:
  Upstream enforced new code style rules, where we had different code.
  Applied the new code style rules.
This commit is contained in:
Claire
2023-12-17 23:04:16 +01:00
136 changed files with 761 additions and 419 deletions

View File

@@ -6,14 +6,20 @@ describe StatusLengthValidator do
describe '#validate' do
it 'does not add errors onto remote statuses' do
status = instance_double(Status, local?: false)
allow(status).to receive(:errors)
subject.validate(status)
expect(status).to_not receive(:errors)
expect(status).to_not have_received(:errors)
end
it 'does not add errors onto local reblogs' do
status = instance_double(Status, local?: false, reblog?: true)
allow(status).to receive(:errors)
subject.validate(status)
expect(status).to_not receive(:errors)
expect(status).to_not have_received(:errors)
end
it 'adds an error when content warning is over MAX_CHARS characters' do