rubocop: fix various style issues.
This commit is contained in:
@@ -35,11 +35,11 @@ module Sources
|
||||
end
|
||||
|
||||
should "get the tags" do
|
||||
assert(@site_1.tags.size > 0)
|
||||
assert_not(@site_1.tags.empty?)
|
||||
first_tag = @site_1.tags.first
|
||||
assert_equal(["アニメ", "https://seiga.nicovideo.jp/tag/%E3%82%A2%E3%83%8B%E3%83%A1"], first_tag)
|
||||
|
||||
assert(@site_2.tags.size > 0)
|
||||
assert_not(@site_2.tags.empty?)
|
||||
first_tag = @site_2.tags.first
|
||||
assert_equal(["アニメ", "https://seiga.nicovideo.jp/tag/%E3%82%A2%E3%83%8B%E3%83%A1"], first_tag)
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'test_helper'
|
||||
|
||||
module Sources
|
||||
class PawooTest < ActiveSupport::TestCase
|
||||
context "The source site for a https://pawoo.net/web/status/$id url" do
|
||||
context "The source site for a https://pawoo.net/web/status/$id url" do
|
||||
setup do
|
||||
skip "Pawoo keys not set" unless Danbooru.config.pawoo_client_id
|
||||
@site = Sources::Strategies.find("https://pawoo.net/web/statuses/1202176")
|
||||
@@ -31,7 +31,7 @@ module Sources
|
||||
end
|
||||
end
|
||||
|
||||
context "The source site for a https://pawoo.net/$user/$id url" do
|
||||
context "The source site for a https://pawoo.net/$user/$id url" do
|
||||
setup do
|
||||
skip "Pawoo keys not set" unless Danbooru.config.pawoo_client_id
|
||||
@site = Sources::Strategies.find("https://pawoo.net/@evazion/19451018")
|
||||
@@ -82,7 +82,7 @@ module Sources
|
||||
end
|
||||
end
|
||||
|
||||
context "The source site for a https://img.pawoo.net/ url" do
|
||||
context "The source site for a https://img.pawoo.net/ url" do
|
||||
setup do
|
||||
skip "Pawoo keys not set" unless Danbooru.config.pawoo_client_id
|
||||
@url = "https://img.pawoo.net/media_attachments/files/001/298/028/original/55a6fd252778454b.mp4"
|
||||
|
||||
@@ -59,9 +59,9 @@ module Sources
|
||||
should "capture the frame data" do
|
||||
assert_equal(2, @site.ugoira_frame_data.size)
|
||||
if @site.ugoira_frame_data[0]["file"]
|
||||
assert_equal([{"file"=>"000000.jpg", "delay"=>125}, {"file"=>"000001.jpg", "delay"=>125}], @site.ugoira_frame_data)
|
||||
assert_equal([{"file" => "000000.jpg", "delay" => 125}, {"file" => "000001.jpg", "delay" => 125}], @site.ugoira_frame_data)
|
||||
else
|
||||
assert_equal([{"delay_msec"=>125}, {"delay_msec"=>125}], @site.ugoira_frame_data)
|
||||
assert_equal([{"delay_msec" => 125}, {"delay_msec" => 125}], @site.ugoira_frame_data)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -171,7 +171,7 @@ module Sources
|
||||
|
||||
should "get the full size image url" do
|
||||
assert_equal("https://i.pximg.net/img-original/img/2017/08/18/00/09/21/64476642_p0.jpg", @site.image_url)
|
||||
end
|
||||
end
|
||||
|
||||
should "get the full size image url for the canonical url" do
|
||||
assert_equal("https://i.pximg.net/img-original/img/2017/08/18/00/09/21/64476642_p0.jpg", @site.canonical_url)
|
||||
@@ -223,7 +223,7 @@ module Sources
|
||||
"mutsu_(kantai_collection)" => "陸奥",
|
||||
"fate/grand_order" => "Fate/GrandOrder",
|
||||
"fate" => "",
|
||||
"foo" => "",
|
||||
"foo" => ""
|
||||
}
|
||||
|
||||
tags.each do |tag, other_names|
|
||||
|
||||
@@ -213,7 +213,7 @@ module Sources
|
||||
should "get the tags" do
|
||||
tags = [
|
||||
%w[foo https://twitter.com/hashtag/foo],
|
||||
%w[ホワイトデー https://twitter.com/hashtag/ホワイトデー],
|
||||
%w[ホワイトデー https://twitter.com/hashtag/ホワイトデー]
|
||||
]
|
||||
|
||||
assert_equal(tags, @site.tags)
|
||||
|
||||
Reference in New Issue
Block a user