chore: Use "destroy!" instead of "destroy" when not checking the return value (#4259)

This commit is contained in:
Jordan Brough 2022-03-24 01:58:25 -06:00 committed by GitHub
parent 8b9aea231c
commit c2647a1f27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 21 additions and 21 deletions

View file

@ -33,7 +33,7 @@ RSpec.describe '/api/v1/widget/messages', type: :request do
describe 'POST /api/v1/widget/messages' do
context 'when post request is made' do
it 'creates message in conversation' do
conversation.destroy # Test all params
conversation.destroy! # Test all params
message_params = { content: 'hello world', timestamp: Time.current }
post api_v1_widget_messages_url,
params: { website_token: web_widget.website_token, message: message_params },
@ -46,7 +46,7 @@ RSpec.describe '/api/v1/widget/messages', type: :request do
end
it 'does not create the message' do
conversation.destroy # Test all params
conversation.destroy! # Test all params
message_params = { content: "#{'h' * 150 * 1000}a", timestamp: Time.current }
post api_v1_widget_messages_url,
params: { website_token: web_widget.website_token, message: message_params },