Skip to content

Commit d352a3f

Browse files
committed
api/schema: rename AssertSchema to AssertRequestSchema
1 parent 1654834 commit d352a3f

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

api/lock_api_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var LockService api.LockService
1414
func TestSuccessfullyObtainingALock(t *testing.T) {
1515
got, body := LockService.Lock(new(api.LockRequest))
1616

17-
AssertSchema(t, &api.RequestSchema{
17+
AssertRequestSchema(t, &api.RequestSchema{
1818
Method: http.MethodPost,
1919
Path: "/locks",
2020
Body: new(api.LockRequest),
@@ -30,7 +30,7 @@ func TestLockSearchWithFilters(t *testing.T) {
3030
},
3131
})
3232

33-
AssertSchema(t, &api.RequestSchema{
33+
AssertRequestSchema(t, &api.RequestSchema{
3434
Method: http.MethodGet,
3535
Query: map[string]string{
3636
"branch": "master",
@@ -46,7 +46,7 @@ func TestLockSearchWithNextCursor(t *testing.T) {
4646
Cursor: "some-lock-id",
4747
})
4848

49-
AssertSchema(t, &api.RequestSchema{
49+
AssertRequestSchema(t, &api.RequestSchema{
5050
Method: http.MethodGet,
5151
Query: map[string]string{
5252
"cursor": "some-lock-id",
@@ -61,7 +61,7 @@ func TestLockSearchWithLimit(t *testing.T) {
6161
Limit: 20,
6262
})
6363

64-
AssertSchema(t, &api.RequestSchema{
64+
AssertRequestSchema(t, &api.RequestSchema{
6565
Method: http.MethodGet,
6666
Query: map[string]string{
6767
"limit": "20",

api/request_schema_test.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,17 @@ import (
77
"github.com/github/git-lfs/vendor/_nuts/github.com/stretchr/testify/assert"
88
)
99

10-
// SchemaTestCase encapsulates a single assertion of equality against two
10+
// AssertRequestSchema encapsulates a single assertion of equality against two
1111
// generated RequestSchema instances.
1212
//
13-
// SchemaTestCases are meant only to test that the request schema generated by
14-
// an API service matches what we expect it to be. A SchemaTestCase does not
15-
// make use of the *api.Client, any particular lifecycle, or spin up a test
16-
// server. All of that behavior is tested at a higher strata in the
17-
// client/lifecycle tests.
18-
//
19-
// For examples, open any `*_api_test.go` file in the `api_test` package.
13+
// This assertion is meant only to test that the request schema generated by an
14+
// API service matches what we expect it to be. It does not make use of the
15+
// *api.Client, any particular lifecycle, or spin up a test server. All of that
16+
// behavior is tested at a higher strata in the client/lifecycle tests.
2017
//
18+
// - t is the *testing.T used to preform the assertion.
2119
// - Expected is the *api.RequestSchema that we expected to be generated.
2220
// - Got is the *api.RequestSchema that was generated by a service.
23-
func AssertSchema(t *testing.T, expected, got *api.RequestSchema) {
21+
func AssertRequestSchema(t *testing.T, expected, got *api.RequestSchema) {
2422
assert.Equal(t, expected, got)
2523
}

0 commit comments

Comments
 (0)