diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-03-27 21:54:44 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-03-27 21:54:44 +0100 |
commit | 7b435fd9bf81265241fab792d8e8e0c2f4f1b619 (patch) | |
tree | ef366f436ed5180489cc9377268e10328fe9a932 /spec/services | |
parent | 02f1c04fabab221130de8dfb5611be81825b193b (diff) | |
parent | 6c79b7237e31eb510af7df3f4f2cb133dea39845 (diff) |
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.
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/post_status_service_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/services/post_status_service_spec.rb b/spec/services/post_status_service_spec.rb index 025a3da40..147a59fc3 100644 --- a/spec/services/post_status_service_spec.rb +++ b/spec/services/post_status_service_spec.rb @@ -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) |