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 21
21
public class StaticPageInDevTest extends AbstractDevWebServerTest {
22
22
@ Test
23
23
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" );
27
27
}
28
28
29
29
@ Test
Original file line number Diff line number Diff line change @@ -39,21 +39,21 @@ public void html() {
39
39
40
40
@ Test
41
41
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');" );
43
43
}
44
44
45
45
@ Test
46
46
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');" );
50
50
get ("/js/non-existing.js" ).should ().respond (404 );
51
51
get ("/js/non-existing.coffee" ).should ().respond (404 );
52
52
}
53
53
54
54
@ Test
55
55
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');" );
57
57
}
58
58
59
59
@ Test
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public void webjar_css() {
33
33
34
34
@ Test
35
35
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" );
37
37
}
38
38
39
39
@ Test
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public void webjar_css() {
37
37
38
38
@ Test
39
39
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" );
41
41
}
42
42
43
43
@ Test
You can’t perform that action at this time.
0 commit comments