diff options
author | 6543 <6543@obermui.de> | 2021-06-29 23:00:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-29 22:00:02 +0100 |
commit | dea7a5c5b9fa7eea331159020268f8898a0a678d (patch) | |
tree | 2f21d25395957a79435874de2c875c249317702b /routers/install | |
parent | add74fb368b4b6a5deee91e052240c0956d7dc5b (diff) | |
download | gitea-dea7a5c5b9fa7eea331159020268f8898a0a678d.tar.gz gitea-dea7a5c5b9fa7eea331159020268f8898a0a678d.zip |
just add some unit tests (#16291)
* code.gitea.io/gitea/routers/utils coverage: 100.0%
* code.gitea.io/gitea/routers/install 0% -> 5.0%
* ConvertUtf8ToUtf8mb4: make sure DBType is mysql
Diffstat (limited to 'routers/install')
-rw-r--r-- | routers/install/routes_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/routers/install/routes_test.go b/routers/install/routes_test.go new file mode 100644 index 0000000000..35a66c1c47 --- /dev/null +++ b/routers/install/routes_test.go @@ -0,0 +1,20 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package install + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestRoutes(t *testing.T) { + routes := Routes() + assert.NotNil(t, routes) + assert.Len(t, routes.R.Routes(), 1) + assert.EqualValues(t, "/", routes.R.Routes()[0].Pattern) + assert.Nil(t, routes.R.Routes()[0].SubRoutes) + assert.Len(t, routes.R.Routes()[0].Handlers, 2) +} |