We are currently using assert_called in a test, where one of the arguments is a list of maps. This test should have failed given that one of the keys inside one of those maps had a nil value, but it did not.
test_with_mock "sends a push notification",
%{key: value }},
PushNotifications,
[:passthrough],
send: fn _ -> :ok end do
PushNotifications.send([%{notification_type: "type1", properties: %{}, recipient_id: "user_2", send_at: nil}])
assert_called(
PushNotifications.send([ %{notification_type: "cm_start", properties: %{}, recipient_id: "user_1"}])
)
end
We are currently using
assert_called
in a test, where one of the arguments is a list of maps. This test should have failed given that one of the keys inside one of those maps had anil
value, but it did not.I tried reproducing this issue by adding a failing test in https://github.com/eproxus/meck. But it does not seem to behave in this way. PR: https://github.com/eproxus/meck/pull/242/files
Do you have any pointers into why this can be happening? Happy to dig to the root cause of this. Thanks for your work on this lib.