File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ defmodule JolaDev.BlogTest do
77 posts = Blog . all_posts ( )
88
99 assert is_list ( posts )
10- assert length ( posts ) > 0
10+ assert posts != [ ]
1111
1212 # Verify posts are sorted by date in descending order
1313 dates = Enum . map ( posts , & & 1 . date )
@@ -20,7 +20,7 @@ defmodule JolaDev.BlogTest do
2020 tags = Blog . all_tags ( )
2121
2222 assert is_list ( tags )
23- assert length ( tags ) > 0
23+ assert tags != [ ]
2424 assert tags == Enum . uniq ( tags )
2525 assert tags == Enum . sort ( tags )
2626 end
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ defmodule JolaDevWeb.BlogControllerTest do
88 assert html_response ( conn , 200 )
99 assert conn . assigns . page_title == "Blog | jola.dev"
1010 assert is_list ( conn . assigns . posts )
11- assert length ( conn . assigns . posts ) > 0
11+ assert conn . assigns . posts != [ ]
1212 end
1313 end
1414
@@ -19,7 +19,7 @@ defmodule JolaDevWeb.BlogControllerTest do
1919
2020 assert html_response ( conn , 200 )
2121 assert conn . assigns . tag == tag
22- assert length ( conn . assigns . posts ) > 0
22+ assert conn . assigns . posts != [ ]
2323 assert Enum . all? ( conn . assigns . posts , fn post -> tag in post . tags end )
2424 end
2525
You can’t perform that action at this time.
0 commit comments