switch vcr web backend to fakeweb, add vcr support for nico seiga tests
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
require 'test_helper'
|
||||
|
||||
module Downloads
|
||||
class NicoSeigaTest < ActiveSupport::TestCase
|
||||
context "a download for a nico seiga image" do
|
||||
setup do
|
||||
# @source = "http://img.tinami.com/illust2/img/330/4e85ecd880a8f.jpg"
|
||||
# @tempfile = Tempfile.new("danbooru-test")
|
||||
# @download = Downloads::File.new(@source, @tempfile.path)
|
||||
end
|
||||
|
||||
should "work" do
|
||||
# @download.download!
|
||||
# assert_equal(201248, ::File.size(@tempfile.path))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,18 +0,0 @@
|
||||
# require 'test_helper'
|
||||
#
|
||||
# module Downloads
|
||||
# class PixaTest < ActiveSupport::TestCase
|
||||
# context "a download for a pixa image" do
|
||||
# setup do
|
||||
# @source = "http://file0.pixa.cc/illustrations/6f/d6/3f/f9/51/61/29/72/23/ac/middle/sse.jpg?1317405928"
|
||||
# @tempfile = Tempfile.new("danbooru-test")
|
||||
# @download = Downloads::File.new(@source, @tempfile.path)
|
||||
# end
|
||||
#
|
||||
# should "work" do
|
||||
# @download.download!
|
||||
# assert_equal(104627, ::File.size(@tempfile.path))
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
@@ -1,18 +0,0 @@
|
||||
# require 'test_helper'
|
||||
#
|
||||
# module Downloads
|
||||
# class TinamiTest < ActiveSupport::TestCase
|
||||
# context "a download for a pixa image" do
|
||||
# setup do
|
||||
# @source = "http://img.tinami.com/illust2/img/330/4e85ecd880a8f.jpg"
|
||||
# @tempfile = Tempfile.new("danbooru-test")
|
||||
# @download = Downloads::File.new(@source, @tempfile.path)
|
||||
# end
|
||||
#
|
||||
# should "work" do
|
||||
# @download.download!
|
||||
# assert_equal(201248, ::File.size(@tempfile.path))
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
@@ -7,8 +7,10 @@ module Sources
|
||||
context "The source site for nico seiga" do
|
||||
setup do
|
||||
# Sources::Strategies::NicoSeiga.new("http://lohas.nicoseiga.jp/priv/2853566?e=1361296671&h=794b3686b02edfd64c22ed2f99a4c55650371854")
|
||||
@site = Sources::Site.new("http://seiga.nicovideo.jp/seiga/im1464351?track=ranking")
|
||||
@site.get
|
||||
|
||||
VCR.use_cassette("source-nico-seiga-unit-test", :record => :new_episodes) do
|
||||
@site = Sources::Site.new("http://seiga.nicovideo.jp/seiga/im1464351?track=ranking")
|
||||
end
|
||||
end
|
||||
|
||||
should "get the profile" do
|
||||
|
||||
Reference in New Issue
Block a user