rely on preview urls if available for gallery
This commit is contained in:
@@ -102,6 +102,10 @@ module Sources
|
||||
assert_equal("https://i.pximg.net/img-original/img/2017/11/21/05/12/37/65981735_p0.jpg", @site.image_url)
|
||||
end
|
||||
|
||||
should "get the preview size image url" do
|
||||
assert_equal("https://i.pximg.net/c/240x240/img-master/img/2017/11/21/05/12/37/65981735_p0.jpg", @site.preview_url)
|
||||
end
|
||||
|
||||
should "get the page count" do
|
||||
assert_equal(1, @site.image_urls.size)
|
||||
end
|
||||
|
||||
@@ -70,6 +70,10 @@ module Sources
|
||||
assert_equal("https://media.tumblr.com/3bbfcbf075ddf969c996641b264086fd/tumblr_os2buiIOt51wsfqepo1_1280.png", @site.image_url)
|
||||
end
|
||||
|
||||
should "get the preview url" do
|
||||
assert_equal("https://media.tumblr.com/3bbfcbf075ddf969c996641b264086fd/tumblr_os2buiIOt51wsfqepo1_250.png", @site.preview_url)
|
||||
end
|
||||
|
||||
should "get the artist" do
|
||||
CurrentUser.user = FactoryBot.create(:user)
|
||||
CurrentUser.ip_addr = "127.0.0.1"
|
||||
|
||||
@@ -78,6 +78,10 @@ module Sources
|
||||
assert_equal("https://pbs.twimg.com/media/C1kt72yVEAEGpOv.jpg:orig", @site.image_url)
|
||||
end
|
||||
|
||||
should "get the preview url" do
|
||||
assert_equal("https://pbs.twimg.com/media/C1kt72yVEAEGpOv.jpg:small", @site.preview_url)
|
||||
end
|
||||
|
||||
should "get the canonical url" do
|
||||
assert_equal("https://twitter.com/aranobu/status/817736083567820800", @site.canonical_url)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user