Skip to content

Commit

Permalink
StandardRB
Browse files Browse the repository at this point in the history
  • Loading branch information
ewlarson committed Nov 4, 2024
1 parent ba6e10a commit e0e94b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions app/helpers/geoblacklight_admin_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ def thumbnail_to_render(document)
document.document_assets.find do |asset|
asset.file_derivatives&.key?(:thumb_standard_2X)
end&.file_url(:thumb_standard_2X)
else
nil
end
end
end
6 changes: 3 additions & 3 deletions test/helpers/geoblacklight_admin_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ class GeoblacklightAdminHelperTest < ActionView::TestCase

@document_with_thumbnail = OpenStruct.new(
thumbnail: OpenStruct.new(
file_url: 'http://example.com/thumbnail.jpg',
file_derivatives: { thumb_standard_2X: 'http://example.com/thumbnail_2x.jpg' }
file_url: "http://example.com/thumbnail.jpg",
file_derivatives: {thumb_standard_2X: "http://example.com/thumbnail_2x.jpg"}
),
document_assets: []
)

@document_with_assets = OpenStruct.new(
thumbnail: nil,
document_assets: [
OpenStruct.new(file_derivatives: { thumb_standard_2X: 'http://example.com/asset_thumbnail_2x.jpg' })
OpenStruct.new(file_derivatives: {thumb_standard_2X: "http://example.com/asset_thumbnail_2x.jpg"})
]
)

Expand Down

0 comments on commit e0e94b2

Please sign in to comment.