It says there's an unexpected token in my params.
"ActionDispatch::Http::Parameters::ParseError: 765: unexpected token at 'conversation_identifier[participant_list][]=2&conversation_identifier[participant_list][]=1"
A version of the test with magic numbers for clarity:
let(:headers) do
{ 'HTTP_CURRENT_USER_ID' => 2,
'Content-Type' => 'application/json' }
end
let(:params) { { conversation_identifier: { participant_list: [1, 2] } }
it 'is getting testy' do
post resource_url, params: params, headers: headers
assert_equal 201, response.status
end
Now here's what's weird. It has no trouble parsing those params if I give it no headers.