webtest: forget database
continuous-integration/drone the build was successful Details

This commit is contained in:
Geno 2021-06-15 17:58:02 +02:00
parent 5ce9b1698b
commit c66f03d829
1 changed files with 6 additions and 0 deletions

View File

@ -72,6 +72,12 @@ func New(assert *assert.Assertions) *testServer {
}
}
// DatabaseForget, to run a test without a database
func (s *testServer) DatabaseForget() {
s.ws.DB = nil
s.db = nil
}
// DatabaseMigration set up a migration on webtest WebService
func (s *testServer) DatabaseMigration(f func(db *database.Database)) {
f(s.db)