func tearDownDatabase(db *couch.Database, t *testing.T) { err := db.DropDatabase() if err != nil { t.Fatal("Tried to delete existing database, failed with error:", err) } }
func insertTestDoc(doc couch.Identifiable, db *couch.Database, t *testing.T) { err := db.Insert(doc) if err != nil { t.Fatal("Inserted new document, error:", err) } }