From d45d52886583aa8140b8dcb20aa226846f64e04a Mon Sep 17 00:00:00 2001 From: Sam Woodard Date: Mon, 6 Jul 2015 12:00:17 -0700 Subject: [PATCH] add assertion that there are two posts --- response_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/response_test.go b/response_test.go index 8d34a9c..a08930f 100644 --- a/response_test.go +++ b/response_test.go @@ -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) {