Skip to content

Commit 71afd55

Browse files
committed
test: fix assertions after js mime change
1 parent a0ea9eb commit 71afd55

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/test/java/net/codestory/http/routes/StaticPageInDevTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
public 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

src/test/java/net/codestory/http/routes/StaticPagesTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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

src/test/java/net/codestory/http/routes/WebjarsInDevTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

src/test/java/net/codestory/http/routes/WebjarsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)