mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-21 07:59:03 +00:00
e81ccc406b
Change all license headers to comply with REUSE specification. Fix #16132 Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
22 lines
491 B
Go
22 lines
491 B
Go
// Copyright 2021 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package install
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestRoutes(t *testing.T) {
|
|
ctx, cancel := context.WithCancel(context.Background())
|
|
defer cancel()
|
|
routes := Routes(ctx)
|
|
assert.NotNil(t, routes)
|
|
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)
|
|
}
|