OLD | NEW |
(Empty) | |
| 1 library pub_tests; |
| 2 import '../../descriptor.dart' as d; |
| 3 import '../../test_pub.dart'; |
| 4 import '../utils.dart'; |
| 5 main() { |
| 6 initConfig(); |
| 7 integration("unbinds a directory from a port", () { |
| 8 d.dir( |
| 9 appPath, |
| 10 [ |
| 11 d.appPubspec(), |
| 12 d.dir("test", [d.file("index.html", "<test body>")]), |
| 13 d.dir("web", [d.file("index.html", "<body>")])]).create(); |
| 14 pubServe(); |
| 15 requestShouldSucceed("index.html", "<body>"); |
| 16 requestShouldSucceed("index.html", "<test body>", root: "test"); |
| 17 expectWebSocketResult("unserveDirectory", { |
| 18 "path": "test" |
| 19 }, { |
| 20 "url": getServerUrl("test") |
| 21 }); |
| 22 requestShouldNotConnect("index.html", root: "test"); |
| 23 requestShouldSucceed("index.html", "<body>"); |
| 24 endPubServe(); |
| 25 }); |
| 26 } |
OLD | NEW |