Skip to content

Commit

Permalink
Test that :app really only pulls from app/assets
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh committed May 20, 2024
1 parent 73f75c0 commit 6998e18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/dummy/lib/assets/stylesheets/library.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Library css that should not be included by :app but should be included by :all
2 changes: 2 additions & 0 deletions test/propshaft_integration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class PropshaftIntegrationTest < ActionDispatch::IntegrationTest

assert_select 'link[href="/assets/hello_world-4137140a.css"][data-custom-attribute="true"]'
assert_select 'link[href="/assets/goodbye-b1dc9940.css"][data-custom-attribute="true"]'
assert_select 'link[href="/assets/library-86a3b7a9.css"][data-custom-attribute="true"]'

assert_select 'script[src="/assets/hello_world-888761f8.js"]'
end
Expand All @@ -17,6 +18,7 @@ class PropshaftIntegrationTest < ActionDispatch::IntegrationTest

assert_select 'link[href="/assets/hello_world-4137140a.css"][data-glob-attribute="true"]'
assert_select 'link[href="/assets/goodbye-b1dc9940.css"][data-glob-attribute="true"]'
assert_select('link[href="/assets/library-86a3b7a9.css"][data-glob-attribute="true"]', count: 0)
end

test "should raise an exception when resolving nonexistent assets" do
Expand Down

0 comments on commit 6998e18

Please sign in to comment.