Otfe/models/testhelpers.go

12 lines
251 B
Go
Raw Normal View History

2022-02-23 12:07:09 +00:00
package models
//DBWipeCollection removes all data from the
//specifed collections
func DBWipeCollection(collections ...string) {
for _, collection := range collections {
c, s := GetCollection(collection)
defer s.Close()
c.RemoveAll(nil)
}
}