Skip to content

Commit

Permalink
Test create_file_name
Browse files Browse the repository at this point in the history
  • Loading branch information
Glutexo committed Apr 7, 2023
1 parent 8b9aae5 commit 05f5b60
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/onigumo_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ defmodule OnigumoTest do
input_url = "https://onigumo.local/hello.html"
created_file_name = Onigumo.Downloader.create_file_name(input_url)

expected_file_name = Hash.md5(input_url, :hex)
input_url_hash = Hash.md5(input_url, :hex)
downloaded_suffix = Application.get_env(:onigumo, :downloaded_suffix)
expected_file_name = input_url_hash <> downloaded_suffix

assert(created_file_name == expected_file_name)
end

Expand Down

0 comments on commit 05f5b60

Please sign in to comment.