From 77a46ee2bb3c48375a75d66263b008969ab1119a Mon Sep 17 00:00:00 2001 From: Stuart Date: Wed, 12 Feb 2025 13:15:54 +0000 Subject: [PATCH] also test update for a data file with no content blob #2139 --- test/functional/data_files_controller_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/functional/data_files_controller_test.rb b/test/functional/data_files_controller_test.rb index ea51da134e..94af0dfa6a 100644 --- a/test/functional/data_files_controller_test.rb +++ b/test/functional/data_files_controller_test.rb @@ -4431,4 +4431,14 @@ def register_content_blob(skip_provide_metadata:false) get :edit, params: { id: df } assert_response :success end + + test 'update data file with nil content blob' do + df = FactoryBot.create(:data_file_with_no_content_blob, title: 'old title') + assert_nil df.content_blob + login_as(df.contributor) + put :update, params: { id: df, data_file: { title: 'new title' } } + assert_response :redirect + df.reload + assert_equal 'new title', df.title + end end