Merge pull request #1027 from metalabdesign/asset_hash_url_fragment_test

Add test against URL fragments for asset hashes
This commit is contained in:
Thomas Reynolds 2013-09-27 23:39:18 -07:00
commit 054b3a772d
2 changed files with 20 additions and 4 deletions

View file

@ -133,3 +133,15 @@ Feature: Assets get a file hash appended to their and references to them are upd
| images/100px-5fd6fb90.gif |
| javascripts/application-1d8d5276.js |
| stylesheets/site.css |
Scenario: Enabling an asset host and referencing assets in CSS with URL fragments are rewritten correctly
Given a successfully built app at "asset-hash-host-app"
When I cd to "build"
Then the following files should exist:
| images/100px-5fd6fb90.jpg |
And the following files should not exist:
| images/100px.jpg |
And the file "stylesheets/fragment-c058ecb2.css" should contain "http://middlemanapp.com/images/100px-5fd6fb90.jpg#test"
And the file "stylesheets/fragment-c058ecb2.css" should not contain "http://middlemanapp.com/images/100px.jpg#test"

View file

@ -0,0 +1,4 @@
#main {
padding: 50px;
background-image: image-url('100px.jpg#test');
}