Skip to content

Commit

Permalink
also test update for a data file with no content blob #2139
Browse files Browse the repository at this point in the history
  • Loading branch information
stuzart committed Feb 12, 2025
1 parent 411f57b commit 77a46ee
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/functional/data_files_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 77a46ee

Please sign in to comment.