chore: Fix contact model silently discarding invalid attributes (#4994)

fixes: #4775
This commit is contained in:
Sojan Jose
2022-07-08 10:28:09 +02:00
committed by GitHub
parent bca347149a
commit e4b159dd54
6 changed files with 38 additions and 24 deletions

View File

@@ -33,7 +33,7 @@ RSpec.describe '/api/v1/widget/contacts', type: :request do
as: :json
expect(response).to have_http_status(:success)
expected_params = { contact: contact, params: params }
expected_params = { contact: contact, params: params, discard_invalid_attrs: true }
expect(ContactIdentifyAction).to have_received(:new).with(expected_params)
expect(identify_action).to have_received(:perform)
end