View Source Kalevala.ConnTest (kalevala v0.1.0)

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

Refresh the conn struct for the character

Link to this section Functions

Link to this macro

assert_actions(conn, 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

build_event(character, topic, data)

View Source

Generate an event struct

Link to this function

process_output(conn, processors)

View Source

Refresh the conn struct for the character

Copies out an updated character and the session