View Source Doumi.Test.Assertions (Doumi.Test v0.1.3)
Summary
Functions
Assert that two maps have the same value for a given fields. The two maps must always contain the given field.
Assert that two values are the same.
Functions
Assert that two maps have the same value for a given fields. The two maps must always contain the given field.
Examples
iex> assert_same_fields %{a: 1, b: 2}, %{a: 1, b: 2}, [:a, :b]
true
iex> assert_same_fields %{a: 1, b: 2}, %{a: 1, b: 3}, [:a, :b]
** (ExUnit.AssertionError)
The two maps have different values for the given fields
Assert that two values are the same.
Examples
iex> assert_same_values 1, 1
true
iex> assert_same_values 1, 2
** (ExUnit.AssertionError)
`1` and `2` are not the same values