FlowAssertions.Define.Defchain (Flow Assertions v0.7.1) View Source

Easier creation of assertions that can be chained together.

That looks like this:

get(conn, ...)
|> assert_will_post_to(:set_fresh_password)
|> assert_user_sees(required_1)
|> assert_user_sees(required_2)

Link to this section Summary

Functions

Assertions are created by using defchain instead of def.

Link to this section Functions

Link to this macro

defchain(head, list)

View Source (macro)

Assertions are created by using defchain instead of def.

defchain assert_user_sees(conn, claim), do: ...
defchain assert_purpose(conn, purpose), do: ...