Added a basic homepage
This commit is contained in:
parent
d40640a648
commit
12fd3c04ca
113 changed files with 414 additions and 506 deletions
21
internal/log/log_test.go
Normal file
21
internal/log/log_test.go
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
package log
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/camzawacki/personal-site/internal/tests"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestCtxSet(t *testing.T) {
|
||||
ctx, _ := tests.NewContext(echo.New(), "/")
|
||||
logger := Ctx(ctx)
|
||||
assert.NotNil(t, logger)
|
||||
|
||||
logger = logger.With("a", "b")
|
||||
Set(ctx, logger)
|
||||
|
||||
got := Ctx(ctx)
|
||||
assert.Equal(t, got, logger)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue