2021-03-19 19:32:18 +00:00
|
|
|
defmodule Legendary.Content.PostsViewTest do
|
|
|
|
use Legendary.Content.ConnCase
|
2020-08-13 20:21:43 +00:00
|
|
|
|
2021-03-19 19:32:18 +00:00
|
|
|
import Legendary.Content.PostsView
|
2020-08-13 20:21:43 +00:00
|
|
|
import Phoenix.HTML, only: [safe_to_string: 1]
|
|
|
|
|
|
|
|
test "auto_paragraph_tags/1 with nil" do
|
|
|
|
assert safe_to_string(auto_paragraph_tags(nil)) =~ ""
|
|
|
|
end
|
|
|
|
|
|
|
|
test "auto_paragraph_tags/1 with text" do
|
|
|
|
assert safe_to_string(auto_paragraph_tags("Bloop\n\nBloop")) =~ "<p>Bloop</p>\n<p>Bloop</p>"
|
|
|
|
end
|
|
|
|
end
|