Set the default User-Agent sent for outgoing http requests.
* Add a `Danbooru.config.http_headers` config option. * Refactor various places to use this option instead of setting the user agent manually.
This commit is contained in:
@@ -14,7 +14,7 @@ module DownloadTestHelper
|
||||
tempfile = Tempfile.new("danbooru-test")
|
||||
download = Downloads::File.new(test_source, tempfile.path)
|
||||
|
||||
rewritten_source, headers, _ = download.before_download(test_source, {}, {})
|
||||
rewritten_source, _, _ = download.before_download(test_source, {})
|
||||
assert_equal(expected_source, rewritten_source, "Tested source URL: #{test_source}")
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user