Skip to content

Commit

Permalink
Update function name for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
joe94 committed Sep 22, 2020
1 parent f7f4cff commit a1c4343
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion store/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func NewGetEndpoint(s S) endpoint.Endpoint {
}
}

func newGetAllEndpoint(s S) endpoint.Endpoint {
func newGetAllItemsEndpoint(s S) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (interface{}, error) {
itemsRequest := request.(*getAllItemsRequest)
items, err := s.GetAll(itemsRequest.bucket)
Expand Down
4 changes: 2 additions & 2 deletions store/endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func testGetAllItemsEndpointDAOFails(t *testing.T) {
mockedErr := errors.New("sports cars api is down")
m.On("GetAll", "sports-cars").Return(map[string]OwnableItem{}, mockedErr)

endpoint := newGetAllEndpoint(m)
endpoint := newGetAllItemsEndpoint(m)
resp, err := endpoint(context.Background(), itemsRequest)

assert.Nil(resp)
Expand Down Expand Up @@ -206,7 +206,7 @@ func testGetAllItemsEndpointFiltered(t *testing.T) {
}
m.On("GetAll", "sports-cars").Return(mockedItems, error(nil))

endpoint := newGetAllEndpoint(m)
endpoint := newGetAllItemsEndpoint(m)
resp, err := endpoint(context.Background(), itemsRequest)

expectedItems := map[string]OwnableItem{
Expand Down

0 comments on commit a1c4343

Please sign in to comment.