diff options
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) |