webtest: forget database
continuous-integration/drone the build was successful
Details
continuous-integration/drone the build was successful
Details
This commit is contained in:
parent
5ce9b1698b
commit
c66f03d829
|
@ -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
|
// DatabaseMigration set up a migration on webtest WebService
|
||||||
func (s *testServer) DatabaseMigration(f func(db *database.Database)) {
|
func (s *testServer) DatabaseMigration(f func(db *database.Database)) {
|
||||||
f(s.db)
|
f(s.db)
|
||||||
|
|
Loading…
Reference in New Issue