Add test against URL fragments for asset hashes

This commit is contained in:
Ali Bosworth 2013-09-26 14:09:47 -07:00
parent 43653b70a4
commit 2738e8ea69
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');
}