14 lines
358 B
Elixir
14 lines
358 B
Elixir
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
|