diff options
author | ThibG <thib@sitedethib.com> | 2020-03-28 15:19:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-28 15:19:05 +0100 |
commit | a192b193bdf7013df09c6cd63916274cd9d47cf7 (patch) | |
tree | 413de2a72a6f3a126e19e12178524ca33c27e436 /spec | |
parent | 02f1c04fabab221130de8dfb5611be81825b193b (diff) | |
parent | d98fabf2ee44c2c25775066abda46552ab05993e (diff) |
Merge pull request #1308 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'spec')
-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) |