Answer by Dogbert for Assert pattern match in phoenix tests
I'm not sure how concise you were expecting, but here's how to do the same thing in one less line of code:%Player{id: id, site_id: site_id} = insert(:player)assert [%Player{id: ^id}] =...
View ArticleAssert pattern match in phoenix tests
I'm testing a phoenix/elixir application, and I find myself using something like the following an awful lot.player = insert(:player)assert [%Player{id: x}] = Players.site_players(player.site_id)assert...
View Article
More Pages to Explore .....