@@ -117,29 +117,41 @@ def test_preload_pack_asset
117
117
end
118
118
119
119
def test_stylesheet_pack_tag_split_chunks
120
- assert_equal \
121
- %(<link rel="stylesheet" media="screen" href="/packs/1-c20632e7baf2c81200d3.chunk.css" />\n ) +
120
+ assert_equal stylesheet_packs_with_chunks_tag ( "application" , "hello_stimulus" ) . in? ( [
121
+ %(<link rel="stylesheet" href="/packs/1-c20632e7baf2c81200d3.chunk.css" media="screen" />\n ) +
122
+ %(<link rel="stylesheet" href="/packs/application-k344a6d59eef8632c9d1.chunk.css" media="screen" />\n ) +
123
+ %(<link rel="stylesheet" href="/packs/hello_stimulus-k344a6d59eef8632c9d1.chunk.css" media="screen" />) ,
124
+
125
+ %(<link rel="stylesheet" media="screen" href="/packs/1-c20632e7baf2c81200d3.chunk.css" />\n ) +
122
126
%(<link rel="stylesheet" media="screen" href="/packs/application-k344a6d59eef8632c9d1.chunk.css" />\n ) +
123
127
%(<link rel="stylesheet" media="screen" href="/packs/hello_stimulus-k344a6d59eef8632c9d1.chunk.css" />) ,
124
- stylesheet_packs_with_chunks_tag ( "application" , "hello_stimulus" )
128
+ ] ) ,
129
+ true
125
130
end
126
131
127
132
def test_stylesheet_pack_tag
128
- assert_equal \
133
+ assert_equal stylesheet_pack_tag ( "bootstrap.css" ) . in? ( [
134
+ %(<link rel="stylesheet" href="/packs/bootstrap-c38deda30895059837cf.css" media="screen" />) ,
135
+
129
136
%(<link rel="stylesheet" media="screen" href="/packs/bootstrap-c38deda30895059837cf.css" />) ,
130
- stylesheet_pack_tag ( "bootstrap.css" )
137
+ ] ) , true
131
138
end
132
139
133
140
def test_stylesheet_pack_tag_symbol
134
- assert_equal \
141
+ assert_equal stylesheet_pack_tag ( :bootstrap ) . in? ( [
142
+ %(<link rel="stylesheet" href="/packs/bootstrap-c38deda30895059837cf.css" media="screen" />) ,
143
+
135
144
%(<link rel="stylesheet" media="screen" href="/packs/bootstrap-c38deda30895059837cf.css" />) ,
136
- stylesheet_pack_tag ( :bootstrap )
145
+ ] ) , true
137
146
end
138
147
139
148
def test_stylesheet_pack_tag_splat
140
- assert_equal \
149
+ assert_equal stylesheet_pack_tag ( "bootstrap.css" , "application.css" , media : "all" ) . in? ( [
150
+ %(<link rel="stylesheet" href="/packs/bootstrap-c38deda30895059837cf.css" media="all" />\n ) +
151
+ %(<link rel="stylesheet" href="/packs/application-dd6b1cd38bfa093df600.css" media="all" />) ,
152
+
141
153
%(<link rel="stylesheet" media="all" href="/packs/bootstrap-c38deda30895059837cf.css" />\n ) +
142
154
%(<link rel="stylesheet" media="all" href="/packs/application-dd6b1cd38bfa093df600.css" />) ,
143
- stylesheet_pack_tag ( "bootstrap.css" , "application.css" , media : "all" )
155
+ ] ) , true
144
156
end
145
157
end
0 commit comments