Merge branch 'master' into glitch-soc/merge-upstream

Conflicts:
- `app/services/post_status_service.rb`:
  CW/sensitive logic fixed upstream, but different in glitch-soc.
  Ported the changes accordingly.
This commit is contained in:
Thibaut Girka
2020-03-27 21:54:44 +01:00
142 changed files with 2619 additions and 1373 deletions

View File

@@ -79,6 +79,13 @@ RSpec.describe PostStatusService, type: :service do
expect(status.spoiler_text).to eq spoiler_text
end
it 'creates a sensitive status when there is a CW but no text' do
status = subject.call(Fabricate(:account), text: '', spoiler_text: 'foo')
expect(status).to be_persisted
expect(status).to be_sensitive
end
it 'creates a status with empty default spoiler text' do
status = create_status_with_options(spoiler_text: nil)