mercury_ex/test/mercury/cleaners/author_tests.ex

14 lines
358 B
Elixir
Raw Normal View History

2019-02-12 03:16:32 +00:00
defmodule AuthorTests do
use ExUnit.Case
doctest Mercury.Cleaners.Author
import Mercury.Cleaners.Author
test "removes the By from an author string" do
assert clean_author("by Bob Dylan") == "Bob Dylan"
end
test "trims trailing whitespace and line breaks" do
assert clean_author("\twritten by\n\tBob Dylan\n\t") == "Bob Dylan"
end
end