Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix | MockClient assertions with fixtures #326

Merged
merged 1 commit into from
Nov 12, 2023

Conversation

Sammyjo20
Copy link
Member

This PR fixes an issue with the MockClient assertions when a fixture doesn't exist. Methods on the MockClient like assertSent would use an array of recordedResponses which were previously only recorded after creating a mock-response. When using fixtures, because the first request that was sent was not a MockResponse, it was never being recorded. This PR changes Saloon so fixtures are recorded to the mock client.

This should resolve #322.

Copy link
Member Author

@Sammyjo20 Sammyjo20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self review

@Sammyjo20 Sammyjo20 merged commit b6696ec into v3 Nov 12, 2023
14 checks passed
@Sammyjo20 Sammyjo20 deleted the fix/mock-client-assertions-with-fixtures branch November 12, 2023 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Asserting sent request fails on first test when recording responses
1 participant