fix tests
This commit is contained in:
@@ -7,13 +7,13 @@ module Downloads
|
||||
@source = "http://mochikko.deviantart.com/art/RESOLUTION-339610451"
|
||||
@tempfile = Tempfile.new("danbooru-test")
|
||||
@download = Downloads::File.new(@source, @tempfile.path)
|
||||
VCR.use_cassette("download-deviant-art-html", :record => :new_episodes) do
|
||||
VCR.use_cassette("download-deviant-art-html", :record => :none) do
|
||||
@download.download!
|
||||
end
|
||||
end
|
||||
|
||||
should "set the direct image link as the source" do
|
||||
assert_equal("http://www.deviantart.com/download/339610451/resolution_by_mochikko-d5m713n.jpg?token=f828643e6e86a658e80f362745a0b20e20880fc6&ts=1414021578", @download.source)
|
||||
assert_equal("http://fc03.deviantart.net/fs71/f/2012/330/e/7/resolution_by_mochikko-d5m713n.jpg", @download.source)
|
||||
end
|
||||
|
||||
should "work" do
|
||||
|
||||
@@ -231,8 +231,8 @@ module Downloads
|
||||
should "download the full size image instead of the thumbnail" do
|
||||
assert_rewritten(@p0_full_size_image_3, @p0_large_thumbnail, "rewrite-pixiv-new-manga-p0-large-thumbnail")
|
||||
assert_rewritten(@p1_full_size_image_3, @p1_large_thumbnail, "rewrite-pixiv-new-manga-p1-large-thumbnail")
|
||||
assert_downloaded(@p0_file_size, @p0_large_thumbnail, "download-pixiv-new-manga-p0-large-thumbnail", :all)
|
||||
assert_downloaded(@p1_file_size, @p1_large_thumbnail, "download-pixiv-new-manga-p1-large-thumbnail", :all)
|
||||
assert_downloaded(@p0_file_size, @p0_large_thumbnail, "download-pixiv-new-manga-p0-large-thumbnail")
|
||||
assert_downloaded(@p1_file_size, @p1_large_thumbnail, "download-pixiv-new-manga-p1-large-thumbnail")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user