Fix #3628: Retry button is displayed for failed uploads that cannot succeed even if retried
This commit is contained in:
@@ -66,12 +66,6 @@ class UploadsController < ApplicationController
|
||||
respond_with(@upload)
|
||||
end
|
||||
|
||||
def update
|
||||
@upload = Upload.find(params[:id])
|
||||
@upload.process!
|
||||
respond_with(@upload)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def find_post_by_url(normalized_url)
|
||||
|
||||
@@ -25,11 +25,6 @@
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% if @upload.is_downloadable? %>
|
||||
<%= form_tag(upload_path(@upload), :method => :put) do %>
|
||||
<% submit_tag "Retry" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
|
||||
@@ -94,19 +94,5 @@ class UploadsControllerTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "update action" do
|
||||
setup do
|
||||
as_user do
|
||||
@upload = create(:source_upload)
|
||||
end
|
||||
end
|
||||
|
||||
should "process an unapproval" do
|
||||
put_auth upload_path(@upload), @user
|
||||
@upload.reload
|
||||
assert_equal("completed", @upload.status)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user