fix: message_type inconsistency across message end points (#10108)
The `before_type_cast` method sometimes returns a string for `message_type`, creating inconsistencies in different payloads. This pull request will remove all `before_type_cast` usage and replace it with `to_i` methods.
This commit is contained in:
@@ -112,6 +112,7 @@ RSpec.describe 'Search', type: :request do
|
||||
|
||||
expect(response_data[:payload].keys).to contain_exactly(:messages)
|
||||
expect(response_data[:payload][:messages].length).to eq 2
|
||||
expect(response_data[:payload][:messages].first[:message_type]).to eq 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user