Index: sdk/lib/_internal/pub/test/serve/does_not_serve_gitignored_assets_test.dart |
diff --git a/sdk/lib/_internal/pub/test/serve/serves_file_with_space_test.dart b/sdk/lib/_internal/pub/test/serve/does_not_serve_gitignored_assets_test.dart |
similarity index 62% |
copy from sdk/lib/_internal/pub/test/serve/serves_file_with_space_test.dart |
copy to sdk/lib/_internal/pub/test/serve/does_not_serve_gitignored_assets_test.dart |
index eead8082839c9d4283c884473baf40648f6c38a7..598ecf79010e2021a4dc1ac988ebe29832533b5e 100644 |
--- a/sdk/lib/_internal/pub/test/serve/serves_file_with_space_test.dart |
+++ b/sdk/lib/_internal/pub/test/serve/does_not_serve_gitignored_assets_test.dart |
@@ -10,20 +10,23 @@ import 'utils.dart'; |
main() { |
initConfig(); |
- integration("serves a filename with a space", () { |
- d.dir(appPath, [ |
+ integration("doesn't serve .gitignored assets", () { |
+ ensureGit(); |
+ |
+ d.git(appPath, [ |
d.appPubspec(), |
d.dir("web", [ |
- d.file("foo bar.txt", "outer contents"), |
- d.dir("sub dir", [ |
+ d.file("outer.txt", "outer contents"), |
+ d.dir("dir", [ |
d.file("inner.txt", "inner contents"), |
]) |
- ]) |
+ ]), |
+ d.file(".gitignore", "/web/outer.txt\n/web/dir") |
]).create(); |
pubServe(); |
- requestShouldSucceed("foo%20bar.txt", "outer contents"); |
- requestShouldSucceed("sub%20dir/inner.txt", "inner contents"); |
+ requestShould404("outer.txt"); |
+ requestShould404("dir/inner.txt"); |
endPubServe(); |
}); |
} |