-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from vdayanand/v/http_fix
Fix Mux tests for 0.7
- Loading branch information
Showing
9 changed files
with
62 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ os: | |
- linux | ||
- osx | ||
julia: | ||
- 0.6 | ||
- 0.7 | ||
- nightly | ||
matrix: | ||
allow_failures: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
julia 0.6 | ||
julia 0.7- | ||
Lazy | ||
Hiccup | ||
HttpCommon | ||
HttpServer | ||
URIParser | ||
AssetRegistry | ||
WebSockets | ||
HTTP | ||
Compat 0.7.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
using HttpCommon | ||
using HTTP | ||
|
||
export method, GET, route, page, probabilty | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Requests | ||
HTTP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
using Mux | ||
using Base.Test | ||
using Lazy | ||
import Requests | ||
using HTTP | ||
|
||
@test Mux.notfound()(d())[:status] == 404 | ||
|
||
# Test basic server | ||
@app test = ( | ||
Mux.defaults, | ||
page(respond("<h1>Hello World!</h1>")), | ||
page("/",respond("<h1>Hello World!</h1>")), | ||
page("/about", respond("<h1>Boo!</h1>")), | ||
page("/user/:user", req -> "<h1>Hello, $(req[:params][:user])!</h1>"), | ||
Mux.notfound()) | ||
serve(test) | ||
@test Requests.text(Requests.get("http://localhost:8000")) == | ||
@test String(HTTP.body(HTTP.get("http://localhost:8000"))) == | ||
"<h1>Hello World!</h1>" | ||
@test Requests.text(Requests.get("http://localhost:8000/about")) == | ||
@test String(HTTP.body(HTTP.get("http://localhost:8000/about"))) == | ||
"<h1>Boo!</h1>" | ||
@test Requests.text(Requests.get("http://localhost:8000/user/julia")) == | ||
@test String(HTTP.body(HTTP.get("http://localhost:8000/user/julia"))) == | ||
"<h1>Hello, julia!</h1>" |