File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed
src/test/java/net/codestory/http/routes Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 2121public class StaticPageInDevTest extends AbstractDevWebServerTest {
2222 @ Test
2323 public void coffeescript_source () {
24- get ("/js/script.coffee.source" ).should ().haveType ("application /javascript" ).contain ("console.log 'Hello'" );
25- get ("/js/anotherscript.coffee.source" ).should ().haveType ("application /javascript" ).contain ("console.log 'foobar'" );
26- get ("/js/literate.litcoffee.source" ).should ().haveType ("application /javascript" ).contain ("This is a literate coffee source with lots of comments" );
24+ get ("/js/script.coffee.source" ).should ().haveType ("text /javascript;charset=UTF-8 " ).contain ("console.log 'Hello'" );
25+ get ("/js/anotherscript.coffee.source" ).should ().haveType ("text /javascript;charset=UTF-8 " ).contain ("console.log 'foobar'" );
26+ get ("/js/literate.litcoffee.source" ).should ().haveType ("text /javascript;charset=UTF-8 " ).contain ("This is a literate coffee source with lots of comments" );
2727 }
2828
2929 @ Test
Original file line number Diff line number Diff line change @@ -39,21 +39,21 @@ public void html() {
3939
4040 @ Test
4141 public void javascript () {
42- get ("/js/script.js" ).should ().haveType ("application /javascript" ).contain ("console.log('Hello');" );
42+ get ("/js/script.js" ).should ().haveType ("text /javascript;charset=UTF-8 " ).contain ("console.log('Hello');" );
4343 }
4444
4545 @ Test
4646 public void coffeescript () {
47- get ("/js/script.coffee" ).should ().haveType ("application /javascript" ).contain ("console.log('Hello');" );
48- get ("/js/script.js" ).should ().haveType ("application /javascript" ).contain ("console.log('Hello');" );
49- get ("/js/anotherscript.js" ).should ().haveType ("application /javascript" ).contain ("console.log('foobar');" );
47+ get ("/js/script.coffee" ).should ().haveType ("text /javascript;charset=UTF-8 " ).contain ("console.log('Hello');" );
48+ get ("/js/script.js" ).should ().haveType ("text /javascript;charset=UTF-8 " ).contain ("console.log('Hello');" );
49+ get ("/js/anotherscript.js" ).should ().haveType ("text /javascript;charset=UTF-8 " ).contain ("console.log('foobar');" );
5050 get ("/js/non-existing.js" ).should ().respond (404 );
5151 get ("/js/non-existing.coffee" ).should ().respond (404 );
5252 }
5353
5454 @ Test
5555 public void literate_coffees () {
56- get ("/js/literate.js" ).should ().haveType ("application /javascript" ).contain ("console.log('Hello');" );
56+ get ("/js/literate.js" ).should ().haveType ("text /javascript;charset=UTF-8 " ).contain ("console.log('Hello');" );
5757 }
5858
5959 @ Test
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public void webjar_css() {
3333
3434 @ Test
3535 public void webjar_js () {
36- get ("/webjars/bootstrap/3.3.5/js/bootstrap.min.js" ).should ().respond (200 ).haveType ("application /javascript" ).contain ("Bootstrap v3.3.5" );
36+ get ("/webjars/bootstrap/3.3.5/js/bootstrap.min.js" ).should ().respond (200 ).haveType ("text /javascript;charset=UTF-8 " ).contain ("Bootstrap v3.3.5" );
3737 }
3838
3939 @ Test
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public void webjar_css() {
3737
3838 @ Test
3939 public void webjar_js () {
40- get ("/webjars/bootstrap/3.3.5/js/bootstrap.min.js" ).should ().respond (200 ).haveType ("application /javascript" ).contain ("Bootstrap v3.3.5" );
40+ get ("/webjars/bootstrap/3.3.5/js/bootstrap.min.js" ).should ().respond (200 ).haveType ("text /javascript;charset=UTF-8 " ).contain ("Bootstrap v3.3.5" );
4141 }
4242
4343 @ Test
You can’t perform that action at this time.
0 commit comments