Skip to content

Commit 3b7a8fc

Browse files
committed
fix
1 parent 7248856 commit 3b7a8fc

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

test/jola_dev/blog_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

test/jola_dev_web/controllers/blog_controller_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)