Files
nginx-proxy-manager/backend/internal/api/context/context_test.go
T

18 lines
385 B
Go
Raw Normal View History

2023-07-25 11:59:02 +10:00
package context
import (
"testing"
"github.com/stretchr/testify/assert"
2023-11-08 09:57:15 +10:00
"go.uber.org/goleak"
2023-07-25 11:59:02 +10:00
)
func TestGetString(t *testing.T) {
2023-11-08 09:57:15 +10:00
// goleak is used to detect goroutine leaks
defer goleak.VerifyNone(t, goleak.IgnoreAnyFunction("database/sql.(*DB).connectionOpener"))
2023-07-25 11:59:02 +10:00
t.Run("basic test", func(t *testing.T) {
assert.Equal(t, "context value: Body", BodyCtxKey.String())
})
}