remove usage of vcr cassettes; delete unused fixtures; fix some broken unit tests

This commit is contained in:
Albert Yi
2016-12-28 15:43:52 -08:00
parent b2296cab70
commit 0ea7d78584
110 changed files with 182 additions and 113327 deletions

View File

@@ -2,20 +2,12 @@ require 'test_helper'
module Downloads
class TumblrTest < ActiveSupport::TestCase
def setup
super
@record = true
setup_vcr
end
context "a download for a tumblr 500 sample" do
setup do
@source = "http://24.media.tumblr.com/fc328250915434e66e8e6a92773f79d0/tumblr_mf4nshfibc1s0oswoo1_500.jpg"
@tempfile = Tempfile.new("danbooru-test")
@download = Downloads::File.new(@source, @tempfile.path)
VCR.use_cassette("downloads-tumblr-test/sample", :record => @vcr_record_option) do
@download.download!
end
@download.download!
end
should "instead change the source to the 1280 version" do
@@ -32,13 +24,7 @@ module Downloads
@source = "http://25.media.tumblr.com/tumblr_lxbzel2H5y1r9yjhso1_500.jpg"
@tempfile = Tempfile.new("danbooru-test")
@download = Downloads::File.new(@source, @tempfile.path)
VCR.use_cassette("downloads-tumblr-test/sample", :record => @vcr_record_option) do
@download.download!
end
end
should "not change the source" do
assert_equal("http://25.media.tumblr.com/tumblr_lxbzel2H5y1r9yjhso1_500.jpg", @download.source)
@download.download!
end
should "download the 500 version" do