test/unit/generator/pdf/document/graphics/test_image.rb in thinreports-0.8.2 vs test/unit/generator/pdf/document/graphics/test_image.rb in thinreports-0.9.0

- old
+ new

@@ -56,15 +56,15 @@ image_registry = test_image.temp_image_registry assert_equal 1, image_registry.count image_id = Digest::MD5.hexdigest(base64_normal_image) assert_includes image_registry.keys, image_id - assert_equal normalized_image_path, image_registry[image_id] + assert_equal normalized_image_path, image_registry[image_id].path assert equal_image(data_file(image_file), normalized_image_path) - assert_same normalized_image_path, + assert_equal normalized_image_path, test_image.normalize_image_from_base64(image_type, base64_normal_image) end end def test_normalize_image_from_base64_with_palette_transparency_png @@ -79,18 +79,18 @@ image_registry = test_image.temp_image_registry assert_equal 1, image_registry.count image_id = Digest::MD5.hexdigest(base64_palleted_png) assert_includes image_registry.keys, image_id - assert_equal normalized_image_path, image_registry[image_id] + assert_equal normalized_image_path, image_registry[image_id].path refute equal_image(data_file('image_pallete_based.png'), normalized_image_path) assert_not_palette_based_transparency_png File.read(normalized_image_path) # 2nd time - assert_same normalized_image_path, + assert_equal normalized_image_path, test_image.normalize_image_from_base64('image/png', base64_palleted_png) assert_equal 1, test_image.temp_image_registry.count end def test_normalize_image_from_file_with_normal_images @@ -128,10 +128,10 @@ assert_not_palette_based_transparency_png File.read(normalized_image_path) # It should never called in 2nd time or subsequent. TestImage::PNGNormalizer.stubs(:load_file).never - assert_same normalized_image_path, + assert_equal normalized_image_path, test_image.normalize_image_from_file(original_image_path) end def assert_not_palette_based_transparency_png(data) image_data = ChunkyPNG::Image.from_blob(data)