assign after source url for uploads
This commit is contained in:
@@ -68,13 +68,20 @@ class UploadsControllerTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
end
|
||||
|
||||
context "for a pixiv post" do
|
||||
context "for a twitter post" do
|
||||
setup do
|
||||
@source = "http://www.pixiv.net/member_illust.php?mode=medium&illust_id=14901720"
|
||||
@source = "https://twitter.com/frappuccino/status/566030116182949888"
|
||||
end
|
||||
|
||||
should "set the correct url" do
|
||||
get_auth new_upload_path, @user, params: {url: @source}
|
||||
should "render" do
|
||||
skip "Twitter keys are not set" unless Danbooru.config.twitter_api_key
|
||||
get_auth new_upload_path, @user, params: {:url => @source}
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
should "set the correct source" do
|
||||
skip "Twitter keys are not set" unless Danbooru.config.twitter_api_key
|
||||
get_auth new_upload_path, @user, params: {:url => @source}
|
||||
assert_response :success
|
||||
Delayed::Worker.new.work_off
|
||||
upload = Upload.last
|
||||
@@ -82,14 +89,6 @@ class UploadsControllerTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
end
|
||||
|
||||
context "for a twitter post" do
|
||||
should "render" do
|
||||
skip "Twitter keys are not set" unless Danbooru.config.twitter_api_key
|
||||
get_auth new_upload_path, @user, params: {:url => "https://twitter.com/frappuccino/status/566030116182949888"}
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
|
||||
context "for a post that has already been uploaded" do
|
||||
setup do
|
||||
as_user do
|
||||
|
||||
Reference in New Issue
Block a user