// test "create_action/1 kind: game_end, valid" { // user = insert(:user) // game = insert(:game, %{ // active: true // }) // insert(:game_user, %{game: game, faction: 1}) // insert(:game_user, %{game: game, faction: 2}) // action = build(:action, %{ // kind: "game_end", // params: ["capture_limit", user.id], // game_id: game.id, // user_id: user.id, // system: true // }) // |> Map.from_struct() // assert {:ok, Action { // game: Game { // active: false // } // } = action} = Engine.create_action(action) // assert_delivered_email WebWarsNotify.Mailers.GameEnd.email(action) // }