示例#1
0
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)
	}
}
示例#2
0
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)
	}
}