|
16 | 16 | package org.ocpsoft.rewrite.faces.outbound;
|
17 | 17 |
|
18 | 18 | import static org.junit.Assert.assertEquals;
|
| 19 | +import static org.junit.Assert.assertThat; |
19 | 20 |
|
| 21 | +import org.hamcrest.Matchers; |
20 | 22 | import org.jboss.arquillian.container.test.api.Deployment;
|
21 | 23 | import org.jboss.arquillian.junit.Arquillian;
|
22 | 24 | import org.jboss.shrinkwrap.api.spec.WebArchive;
|
23 | 25 | import org.junit.Test;
|
24 | 26 | import org.junit.experimental.categories.Category;
|
25 | 27 | import org.junit.runner.RunWith;
|
26 | 28 | import org.ocpsoft.rewrite.category.IgnoreForGlassfish4;
|
| 29 | +import org.ocpsoft.rewrite.config.ConfigurationProvider; |
27 | 30 | import org.ocpsoft.rewrite.faces.annotation.RewriteFacesAnnotationsTest;
|
28 | 31 | import org.ocpsoft.rewrite.test.RewriteTest;
|
29 | 32 | import org.ocpsoft.rewrite.test.RewriteTestBase;
|
30 | 33 |
|
31 | 34 | import com.gargoylesoftware.htmlunit.html.DomElement;
|
32 | 35 | import com.gargoylesoftware.htmlunit.html.DomNodeList;
|
33 | 36 | import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
34 |
| -import org.ocpsoft.rewrite.config.ConfigurationProvider; |
35 | 37 |
|
36 | 38 | /**
|
37 | 39 | * This test doesn't work on Glassfish 4.0 at all. For some reason Glassfish _always_ appends the JSESSIONID, even if
|
@@ -67,7 +69,7 @@ public void testResourceUrlRewritten() throws Exception
|
67 | 69 | HtmlPage page = getWebClient("/outbound").getPage();
|
68 | 70 | DomNodeList<DomElement> stylesheets = page.getElementsByTagName("link");
|
69 | 71 | assertEquals(1, stylesheets.size());
|
70 |
| - assertEquals("/css/style.css", stylesheets.get(0).getAttribute("href")); |
| 72 | + assertThat(stylesheets.get(0).getAttribute("href"), Matchers.endsWith("/css/style.css?ln=test")); |
71 | 73 | }
|
72 | 74 |
|
73 | 75 | }
|
0 commit comments