Skip to content

Commit

Permalink
Removing controller action for file cluster (#1706)
Browse files Browse the repository at this point in the history
The option was removed from the wizard.  We should also remove it from the controller
  • Loading branch information
carolyncole authored Mar 21, 2024
1 parent 2d009fb commit fe93d89
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
7 changes: 0 additions & 7 deletions app/controllers/works_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ def attachment_selected
next_url = case @work.files_location
when "file_upload"
work_file_upload_url(@work)
when "file_cluster"
work_file_cluster_url(@work)
else
work_file_other_url(@work)
end
Expand Down Expand Up @@ -181,11 +179,6 @@ def file_uploaded
redirect_to work_file_upload_path(@work)
end

# Allow user to indicate where their files are located in the PUL Research Cluster
def file_cluster
@work = Work.find(params[:id])
end

# Allow user to indicate where their files are located in the WWW
def file_other
@work = Work.find(params[:id])
Expand Down
1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
post "works/:id/attachment-select", to: "works#attachment_selected", as: :work_attachment_selected
patch "works/:id/file-upload", to: "works#file_uploaded", as: :work_file_uploaded
get "works/:id/file-upload", to: "works#file_upload", as: :work_file_upload
get "works/:id/file-cluster", to: "works#file_cluster", as: :work_file_cluster
get "works/:id/file-other", to: "works#file_other", as: :work_file_other
get "works/:id/review", to: "works#review", as: :work_review
post "works/:id/review", to: "works#review"
Expand Down
10 changes: 0 additions & 10 deletions spec/controllers/works_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -700,16 +700,6 @@
expect(fake_s3_service).not_to have_received(:create_directory)
end

context "when type is file_cluster" do
let(:attachment_type) { "file_cluster" }

it "redirects to file-cluster" do
expect(response.status).to be 302
expect(response.location).to eq "http://test.host/works/#{work.id}/file-cluster"
expect(fake_s3_service).to have_received(:create_directory)
end
end

context "when type is file_other" do
let(:attachment_type) { "file_other" }

Expand Down

0 comments on commit fe93d89

Please sign in to comment.