catch error and check with testhelper
diff --git a/rackspace/compute/v2/networks/requests_test.go b/rackspace/compute/v2/networks/requests_test.go
index 895dc83..6f44c1c 100644
--- a/rackspace/compute/v2/networks/requests_test.go
+++ b/rackspace/compute/v2/networks/requests_test.go
@@ -42,7 +42,7 @@
client := fake.ServiceClient()
count := 0
- List(client).EachPage(func(page pagination.Page) (bool, error) {
+ err := List(client).EachPage(func(page pagination.Page) (bool, error) {
count++
actual, err := ExtractNetworks(page)
if err != nil {
@@ -67,10 +67,8 @@
return true, nil
})
-
- if count != 1 {
- t.Errorf("Expected 1 page, got %d", count)
- }
+ th.AssertNoErr(t, err)
+ th.CheckEquals(t, 1, count)
}
func TestGet(t *testing.T) {