go-redis / redismock

Redis client Mock
https://redis.uptrace.dev
BSD 2-Clause "Simplified" License
280 stars 60 forks source link

feat: Add UnexpectedCallsWereMade() to support checking unexpected command call #91

Closed antonyho closed 3 months ago

antonyho commented 3 months ago

The calling to fail on unexpected command call is there.

This Pull Request adds UnexpectedCallsWereMade function to support checking unexpected command call. When there is unexpected command call, it appends the command to a slice. The UnexpectedCallsWereMade function will return which unexpected commands were called on the mock client.