Skip to content

Commit

Permalink
search: record Searches in MockClient
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf committed Jan 17, 2025
1 parent 0e34ede commit e82d0b5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/search/mock_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import (
)

type MockClient struct {
Err error
Err error

Searches []Entity[Value]

SearchResponse SearchResponse
}

Expand All @@ -19,5 +22,8 @@ func (c *MockClient) SearchByEntity(ctx context.Context, entity Entity[Value], o
if c.Err != nil {
return SearchResponse{}, c.Err
}

c.Searches = append(c.Searches, entity)

return c.SearchResponse, c.Err
}

0 comments on commit e82d0b5

Please sign in to comment.