Fix tests
This commit is contained in:
parent
40800c6527
commit
94acf36994
1 changed files with 1 additions and 5 deletions
|
@ -2,10 +2,6 @@ package database
|
||||||
|
|
||||||
import "testing"
|
import "testing"
|
||||||
|
|
||||||
import (
|
|
||||||
"labix.org/v2/mgo/bson"
|
|
||||||
)
|
|
||||||
|
|
||||||
var book = map[string]interface{}{
|
var book = map[string]interface{}{
|
||||||
"title": "some title",
|
"title": "some title",
|
||||||
"author": []string{"Alice", "Bob"},
|
"author": []string{"Alice", "Bob"},
|
||||||
|
@ -17,7 +13,7 @@ func TestAddBook(t *testing.T) {
|
||||||
|
|
||||||
tAddBook(t, db)
|
tAddBook(t, db)
|
||||||
|
|
||||||
books, num, err := db.GetBooks(bson.M{}, 1, 0)
|
books, num, err := db.GetNewBooks(1, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("db.GetBooks() return an error: ", err)
|
t.Fatalf("db.GetBooks() return an error: ", err)
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue