mirror of
https://github.com/StrawberryMaster/wayback-machine-downloader.git
synced 2025-12-29 16:16:06 +00:00
Add test for file list retrieval and file list download
This commit is contained in:
@@ -1,8 +1,24 @@
|
|||||||
require 'minitest/autorun'
|
require 'minitest/autorun'
|
||||||
|
require 'pry-rescue/minitest'
|
||||||
require 'wayback_machine_downloader'
|
require 'wayback_machine_downloader'
|
||||||
|
|
||||||
|
|
||||||
class WaybackMachineDownloaderTest < Minitest::Test
|
class WaybackMachineDownloaderTest < Minitest::Test
|
||||||
def test_english_hello
|
|
||||||
assert_equal "Hello world! John", WaybackMachineDownloader.hi("John")
|
def setup
|
||||||
|
@wayback_machine_downloader = WaybackMachineDownloader.new base_url: 'http://www.onlyfreegames.net'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_base_url_being_set
|
||||||
|
assert_equal 'http://www.onlyfreegames.net', @wayback_machine_downloader.base_url
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_file_list_curated
|
||||||
|
assert_equal 20081120203712, @wayback_machine_downloader.file_list_curated["linux.htm"][:timestamp]
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_file_download
|
||||||
|
@wayback_machine_downloader.download_files
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user