Created
December 4, 2016 12:25
-
-
Save defndaines/3fe0ade7774e76d7834b034364e57b72 to your computer and use it in GitHub Desktop.
Uses assert to solve warning from https://gist.github.com/defndaines/8bdc89b4d4b4a9c3e9370b73b0f7b65e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| movie = Store.insert_movie(movie_map) | |
| movie_list = Eiga.Movie |> select([movie], movie.title) |> Eiga.Repo.all | |
| assert Enum.find(movie_list, &(&1 == movie_map["title"])) | |
| assert movie == Store.insert_movie(movie_map) | |
| assert Enum.filter(movie_list, &(&1 == movie_map["title"])) == [Enum.find(movie_list, &(&1 == movie_map["title"]))] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment