add assertion that there are two posts

This commit is contained in:
Sam Woodard 2015-07-06 12:00:17 -07:00
parent 68210ff3ec
commit d45d528865
1 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"reflect"
"testing"
)
@ -110,6 +111,10 @@ func TestRelations(t *testing.T) {
if relations["current_post"] == nil {
t.Fatalf("Current post relationship was not materialized")
}
if reflect.ValueOf(relations["posts"]).Len() != 2 {
t.Fatalf("Did not materialize two posts")
}
}
func TestNoRelations(t *testing.T) {