Kalevala.ConnTest (kalevala v0.1.0) View Source

Test helpers for testing Controllers/Commands/Actions/etc

Link to this section Summary

Functions

Assert the expected actions match the actions stored in the conn

Build a simple conn struct for the character

Generate an event struct

Link to this section Functions

Link to this macro

assert_actions(actual_actions, expected_actions)

View Source (macro)

Assert the expected actions match the actions stored in the conn

This expects the order to match and have no extra actions in the actual_actions.

Link to this function

build_conn(character, session \\ %{})

View Source

Build a simple conn struct for the character

Link to this function

event(character, topic, data)

View Source

Generate an event struct