Skip to content

Commit

Permalink
Make sure the digest path changes when the environment changes
Browse files Browse the repository at this point in the history
This is to make sure the digest path also changes for files without
preprocessors.

Closes #680.

Co-authored-by: Rafael Masson <rafael@missiveapp.com>
  • Loading branch information
rafaelfranca and rafbm committed Jun 5, 2020
1 parent 0bcb8ae commit 7f64817
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test_environment.rb
Expand Up @@ -726,6 +726,12 @@ def setup
refute_equal old_asset_digest, @env["gallery.js"].digest_path
end

test "changing version changes the digest_path of the asset when there is no preposessor" do
old_asset_digest = @env["blank.gif"].digest_path
@env.version = 'v2'
refute_equal old_asset_digest, @env["blank.gif"].digest_path
end

test "changing version changes the etag of the asset" do
old_asset_etag = @env["gallery.js"].etag
@env.version = 'v2'
Expand Down

0 comments on commit 7f64817

Please sign in to comment.