auth
auth/authcode_test.go
Turn AddEndpoint into AddEndpoints. Because one is a special case of many, it makes sense to be able to add multiple endpoints in a single call to the database. So we've converted the AddEndpoint method into an AddEndpoints method and updated our tests appropriately. We also filled in the errors when creating a client through the API, and moved things around to optimize for the maximum number of errors returned in a single call.
1.1 --- a/authcode_test.go Sat Jan 10 04:16:07 2015 -0500 1.2 +++ b/authcode_test.go Wed Jan 14 00:23:30 2015 -0500 1.3 @@ -139,7 +139,7 @@ 1.4 if err != nil { 1.5 t.Fatal("Can't store client:", err) 1.6 } 1.7 - err = testContext.AddEndpoint(client.ID, endpoint) 1.8 + err = testContext.AddEndpoints(client.ID, []Endpoint{endpoint}) 1.9 if err != nil { 1.10 t.Fatal("Can't store endpoint:", err) 1.11 }