Skip to content

Commit 7f64817

Browse files
rafaelfrancarafbm
andcommitted
Make sure the digest path changes when the environment changes
This is to make sure the digest path also changes for files without preprocessors. Closes #680. Co-authored-by: Rafael Masson <[email protected]>
1 parent 0bcb8ae commit 7f64817

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test_environment.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,12 @@ def setup
726726
refute_equal old_asset_digest, @env["gallery.js"].digest_path
727727
end
728728

729+
test "changing version changes the digest_path of the asset when there is no preposessor" do
730+
old_asset_digest = @env["blank.gif"].digest_path
731+
@env.version = 'v2'
732+
refute_equal old_asset_digest, @env["blank.gif"].digest_path
733+
end
734+
729735
test "changing version changes the etag of the asset" do
730736
old_asset_etag = @env["gallery.js"].etag
731737
@env.version = 'v2'

0 commit comments

Comments
 (0)