mirror of
https://github.com/kataras/iris.git
synced 2025-12-20 03:17:04 +00:00
create the new FileServer and HandleDir, deprecate the rest APIBuilder/Party static methods and more
relative: https://github.com/kataras/iris/issues/1283 and removing pongo2 from vendor: https://github.com/kataras/iris/issues/1284 Former-commit-id: 3ec57b349f99faca2b8e36d9f7252db0b6ea080d
This commit is contained in:
@@ -66,12 +66,21 @@ var urls = []resource{
|
||||
}
|
||||
|
||||
// if bindata's values matches with the assets/... contents
|
||||
// and secondly if the StaticEmbedded had successfully registered
|
||||
// and secondly if the HandleDir had successfully registered
|
||||
// the routes and gave the correct response.
|
||||
func TestEmbeddingFilesIntoApp(t *testing.T) {
|
||||
app := newApp()
|
||||
e := httptest.New(t, app)
|
||||
|
||||
route := app.GetRouteReadOnly("GET/static/{file:path}")
|
||||
if route == nil {
|
||||
t.Fatalf("expected a route to serve embedded files")
|
||||
}
|
||||
|
||||
if len(route.StaticSites()) > 0 {
|
||||
t.Fatalf("not expected a static site, the ./assets directory or its subdirectories do not contain any index.html")
|
||||
}
|
||||
|
||||
if runtime.GOOS != "windows" {
|
||||
// remove the embedded static favicon for !windows,
|
||||
// it should be built for unix-specific in order to be work
|
||||
|
||||
Reference in New Issue
Block a user