@@ -26,57 +26,57 @@ def test_asset_pack_url
26
26
27
27
def test_image_pack_path
28
28
assert_equal "/packs/application-k344a6d59eef8632c9d1.png" , image_pack_path ( "application.png" )
29
- assert_equal "/packs/media/images /image-c38deda30895059837cf.jpg" , image_pack_path ( "image.jpg" )
30
- assert_equal "/packs/media/images/ image-c38deda30895059837cf.jpg" , image_pack_path ( "media/images /image.jpg" )
31
- assert_equal "/packs/media/images /nested/image-c38deda30895059837cf.jpg" , image_pack_path ( "nested/image.jpg" )
32
- assert_equal "/packs/media/images/ nested/image-c38deda30895059837cf.jpg" , image_pack_path ( "media/images /nested/image.jpg" )
29
+ assert_equal "/packs/static /image-c38deda30895059837cf.jpg" , image_pack_path ( "image.jpg" )
30
+ assert_equal "/packs/static/ image-c38deda30895059837cf.jpg" , image_pack_path ( "static /image.jpg" )
31
+ assert_equal "/packs/static /nested/image-c38deda30895059837cf.jpg" , image_pack_path ( "nested/image.jpg" )
32
+ assert_equal "/packs/static/ nested/image-c38deda30895059837cf.jpg" , image_pack_path ( "static /nested/image.jpg" )
33
33
end
34
34
35
35
def test_image_pack_url
36
36
assert_equal "https://example.com/packs/application-k344a6d59eef8632c9d1.png" , image_pack_url ( "application.png" )
37
- assert_equal "https://example.com/packs/media/images /image-c38deda30895059837cf.jpg" , image_pack_url ( "image.jpg" )
38
- assert_equal "https://example.com/packs/media/images/ image-c38deda30895059837cf.jpg" , image_pack_url ( "media/images /image.jpg" )
39
- assert_equal "https://example.com/packs/media/images /nested/image-c38deda30895059837cf.jpg" , image_pack_url ( "nested/image.jpg" )
40
- assert_equal "https://example.com/packs/media/images/ nested/image-c38deda30895059837cf.jpg" , image_pack_url ( "media/images /nested/image.jpg" )
37
+ assert_equal "https://example.com/packs/static /image-c38deda30895059837cf.jpg" , image_pack_url ( "image.jpg" )
38
+ assert_equal "https://example.com/packs/static/ image-c38deda30895059837cf.jpg" , image_pack_url ( "static /image.jpg" )
39
+ assert_equal "https://example.com/packs/static /nested/image-c38deda30895059837cf.jpg" , image_pack_url ( "nested/image.jpg" )
40
+ assert_equal "https://example.com/packs/static/ nested/image-c38deda30895059837cf.jpg" , image_pack_url ( "static /nested/image.jpg" )
41
41
end
42
42
43
43
def test_image_pack_tag
44
44
assert_equal \
45
45
"<img alt=\" Edit Entry\" src=\" /packs/application-k344a6d59eef8632c9d1.png\" width=\" 16\" height=\" 10\" />" ,
46
46
image_pack_tag ( "application.png" , size : "16x10" , alt : "Edit Entry" )
47
47
assert_equal \
48
- "<img alt=\" Edit Entry\" src=\" /packs/media/images /image-c38deda30895059837cf.jpg\" width=\" 16\" height=\" 10\" />" ,
48
+ "<img alt=\" Edit Entry\" src=\" /packs/static /image-c38deda30895059837cf.jpg\" width=\" 16\" height=\" 10\" />" ,
49
49
image_pack_tag ( "image.jpg" , size : "16x10" , alt : "Edit Entry" )
50
50
assert_equal \
51
- "<img alt=\" Edit Entry\" src=\" /packs/media/images /image-c38deda30895059837cf.jpg\" width=\" 16\" height=\" 10\" />" ,
52
- image_pack_tag ( "media/images /image.jpg" , size : "16x10" , alt : "Edit Entry" )
51
+ "<img alt=\" Edit Entry\" src=\" /packs/static /image-c38deda30895059837cf.jpg\" width=\" 16\" height=\" 10\" />" ,
52
+ image_pack_tag ( "static /image.jpg" , size : "16x10" , alt : "Edit Entry" )
53
53
assert_equal \
54
- "<img alt=\" Edit Entry\" src=\" /packs/media/images /nested/image-c38deda30895059837cf.jpg\" width=\" 16\" height=\" 10\" />" ,
54
+ "<img alt=\" Edit Entry\" src=\" /packs/static /nested/image-c38deda30895059837cf.jpg\" width=\" 16\" height=\" 10\" />" ,
55
55
image_pack_tag ( "nested/image.jpg" , size : "16x10" , alt : "Edit Entry" )
56
56
assert_equal \
57
- "<img alt=\" Edit Entry\" src=\" /packs/media/images /nested/image-c38deda30895059837cf.jpg\" width=\" 16\" height=\" 10\" />" ,
58
- image_pack_tag ( "media/images /nested/image.jpg" , size : "16x10" , alt : "Edit Entry" )
57
+ "<img alt=\" Edit Entry\" src=\" /packs/static /nested/image-c38deda30895059837cf.jpg\" width=\" 16\" height=\" 10\" />" ,
58
+ image_pack_tag ( "static /nested/image.jpg" , size : "16x10" , alt : "Edit Entry" )
59
59
assert_equal \
60
- "<img srcset=\" /packs/media/images/ image-2x-7cca48e6cae66ec07b8e.jpg 2x\" src=\" /packs/media/images /image-c38deda30895059837cf.jpg\" />" ,
61
- image_pack_tag ( "media/images/ image.jpg" , srcset : { "media/images /image-2x.jpg" => "2x" } )
60
+ "<img srcset=\" /packs/static/ image-2x-7cca48e6cae66ec07b8e.jpg 2x\" src=\" /packs/static /image-c38deda30895059837cf.jpg\" />" ,
61
+ image_pack_tag ( "static/ image.jpg" , srcset : { "static /image-2x.jpg" => "2x" } )
62
62
end
63
63
64
64
def test_favicon_pack_tag
65
65
assert_equal \
66
66
"<link rel=\" apple-touch-icon\" type=\" image/png\" href=\" /packs/application-k344a6d59eef8632c9d1.png\" />" ,
67
67
favicon_pack_tag ( "application.png" , rel : "apple-touch-icon" , type : "image/png" )
68
68
assert_equal \
69
- "<link rel=\" apple-touch-icon\" type=\" image/png\" href=\" /packs/media/images /mb-icon-c38deda30895059837cf.png\" />" ,
69
+ "<link rel=\" apple-touch-icon\" type=\" image/png\" href=\" /packs/static /mb-icon-c38deda30895059837cf.png\" />" ,
70
70
favicon_pack_tag ( "mb-icon.png" , rel : "apple-touch-icon" , type : "image/png" )
71
71
assert_equal \
72
- "<link rel=\" apple-touch-icon\" type=\" image/png\" href=\" /packs/media/images /mb-icon-c38deda30895059837cf.png\" />" ,
73
- favicon_pack_tag ( "media/images /mb-icon.png" , rel : "apple-touch-icon" , type : "image/png" )
72
+ "<link rel=\" apple-touch-icon\" type=\" image/png\" href=\" /packs/static /mb-icon-c38deda30895059837cf.png\" />" ,
73
+ favicon_pack_tag ( "static /mb-icon.png" , rel : "apple-touch-icon" , type : "image/png" )
74
74
assert_equal \
75
- "<link rel=\" apple-touch-icon\" type=\" image/png\" href=\" /packs/media/images /nested/mb-icon-c38deda30895059837cf.png\" />" ,
75
+ "<link rel=\" apple-touch-icon\" type=\" image/png\" href=\" /packs/static /nested/mb-icon-c38deda30895059837cf.png\" />" ,
76
76
favicon_pack_tag ( "nested/mb-icon.png" , rel : "apple-touch-icon" , type : "image/png" )
77
77
assert_equal \
78
- "<link rel=\" apple-touch-icon\" type=\" image/png\" href=\" /packs/media/images /nested/mb-icon-c38deda30895059837cf.png\" />" ,
79
- favicon_pack_tag ( "media/images /nested/mb-icon.png" , rel : "apple-touch-icon" , type : "image/png" )
78
+ "<link rel=\" apple-touch-icon\" type=\" image/png\" href=\" /packs/static /nested/mb-icon-c38deda30895059837cf.png\" />" ,
79
+ favicon_pack_tag ( "static /nested/mb-icon.png" , rel : "apple-touch-icon" , type : "image/png" )
80
80
end
81
81
82
82
def test_preload_pack_asset
0 commit comments