authelia/internal/middlewares/log_request_test.go
Amir Zarrinkafsh 1600e0f7da
[CI] Add wsl linter (#980)
* [CI] Add wsl linter

* Implement wsl recommendations

Co-authored-by: Clément Michaud <clement.michaud34@gmail.com>
2020-05-05 21:35:32 +02:00

20 lines
333 B
Go

package middlewares
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/valyala/fasthttp"
)
func TestShouldCallNextFunction(t *testing.T) {
var val = false
f := func(ctx *fasthttp.RequestCtx) { val = true }
context := &fasthttp.RequestCtx{}
LogRequestMiddleware(f)(context)
assert.Equal(t, true, val)
}