sm: added todos
This commit is contained in:
parent
462749bbb9
commit
950f9098ab
2 changed files with 8 additions and 0 deletions
|
|
@ -13,16 +13,22 @@ import (
|
|||
func TestCreateNoteHandlerOnSucess(t *testing.T) {
|
||||
|
||||
// Arrange
|
||||
// TODO: move to test vars and main_test.go
|
||||
db, err := sql.Open("sqlite", test.NewTestVars().DbPath)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to open database: %v", err)
|
||||
}
|
||||
defer db.Close()
|
||||
|
||||
uow := repositories.NewUnitOfWork(db)
|
||||
|
||||
handler := handlers.NewCreateNoteHandler(uow)
|
||||
|
||||
// TODO: add to test vars and move to main_test.go
|
||||
ctx := test.Context()
|
||||
|
||||
// Act
|
||||
|
||||
|
||||
// Assert
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package test
|
|||
|
||||
import "os"
|
||||
|
||||
// todo: move into main_test.go and add utility functions in there
|
||||
type TestVars struct {
|
||||
DbPath string
|
||||
}
|
||||
|
|
@ -12,3 +13,4 @@ func NewTestVars() *TestVars {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue