initial commit
This commit is contained in:
commit
54576d9d33
61 changed files with 5569 additions and 0 deletions
13
internal/database/database_test.go
Normal file
13
internal/database/database_test.go
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
package database
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestUpSection(t *testing.T) {
|
||||
got, err := upSection("-- +goose Up\nCREATE TABLE example(id int);\n-- +goose Down\nDROP TABLE example;")
|
||||
if err != nil {
|
||||
t.Fatalf("upSection() error = %v", err)
|
||||
}
|
||||
if got != "\nCREATE TABLE example(id int);\n" {
|
||||
t.Fatalf("unexpected section: %q", got)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue