diff --git a/lib/whitehall/image_kinds.rb b/lib/whitehall/image_kinds.rb index 8c43343bf5d..d4999bb34a7 100644 --- a/lib/whitehall/image_kinds.rb +++ b/lib/whitehall/image_kinds.rb @@ -39,7 +39,7 @@ def version_names class ImageKinds def self.build_image_kinds(hash) - hash.transform_values { |config| ImageKind.new(name, config) }.freeze + hash.to_h { |name, config| [name, ImageKind.new(name, config)] }.freeze end end end diff --git a/test/unit/lib/whitehall_test.rb b/test/unit/lib/whitehall_test.rb index af61cfec7ef..23e337c2446 100644 --- a/test/unit/lib/whitehall_test.rb +++ b/test/unit/lib/whitehall_test.rb @@ -27,6 +27,7 @@ class WhitehallTest < ActiveSupport::TestCase test "Whitehall.image_kinds is populated with defaults from config" do assert_pattern do Whitehall.image_kinds["default"] => { + name: "default", valid_width: 960, valid_height: 640, versions: [