Add TestController (#50)
This can be used in tests to get access to a controller that behaves just like a dev controller but doesn't require the normal Command bits (UI, etc). This can be enhanced over time as needed; for now it's pretty simple but it's good enough to be used for API tests. A simple project create/read API test is added as well, which serves to show the programmatic model (as well as test those functions at the API level).
This commit is contained in:
1 parent
2aca5fff03
commit
f8b456f3a7
13 files changed
+306
-32
No files matched your search
@@ -16,7 +16,7 @@ func TestSetup(t *testing.T, dialect string) (func() error, *gorm.DB, string) {
|
||||
cleanup := func() error { return nil }
|
||||
var url string
|
||||
var err error
|
||||
cleanup, url, err = InitDbInDocker(dialect)
|
||||
cleanup, url, _, err = InitDbInDocker(dialect)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -43,4 +43,3 @@ func TestWrapper(t *testing.T) wrapping.Wrapper {
|
||||
}
|
||||
return root
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user