Update tests to reflect new API selectors

This commit is contained in:
hartator 2016-09-26 10:35:38 -07:00
parent fe96570c93
commit 5d1fefe252

View File

@ -26,14 +26,14 @@ class WaybackMachineDownloaderTest < Minitest::Test
end end
def test_file_list_curated def test_file_list_curated
assert_equal 20081120203712, @wayback_machine_downloader.get_file_list_curated["linux.htm"][:timestamp] assert_equal 20060711191226, @wayback_machine_downloader.get_file_list_curated["linux.htm"][:timestamp]
end end
def test_file_list_by_timestamp def test_file_list_by_timestamp
file_expected = { file_expected = {
file_id: "page.html", file_id: "Fs-06.jpg",
file_url: "http://www.onlyfreegames.net:80/page.html", file_url: "http://www.onlyfreegames.net:80/Fs-06.jpg",
timestamp: 20060713153753 timestamp: 20060716125343
} }
assert_equal file_expected, @wayback_machine_downloader.get_file_list_by_timestamp[-1] assert_equal file_expected, @wayback_machine_downloader.get_file_list_by_timestamp[-1]
end end
@ -77,7 +77,7 @@ class WaybackMachineDownloaderTest < Minitest::Test
def test_from_timestamp_being_respected def test_from_timestamp_being_respected
@wayback_machine_downloader.from_timestamp = 20050716231334 @wayback_machine_downloader.from_timestamp = 20050716231334
file_url = @wayback_machine_downloader.get_file_list_curated["linux.htm"][:file_url] file_url = @wayback_machine_downloader.get_file_list_curated["linux.htm"][:file_url]
assert_equal "http://www.onlyfreegames.net/linux.htm", file_url assert_equal "http://www.onlyfreegames.net:80/linux.htm", file_url
end end
def test_to_timestamp_being_respected def test_to_timestamp_being_respected