faeldt / redis-mock

Node.js redis client mock
112 stars 157 forks source link

Implement setex method #16

Closed parente closed 11 years ago

parente commented 11 years ago

I added a simple setex implementation to allow the connect-redis session store to use redis-mock. It's useful when running tests against a web app in development. I wrote two tests to go with the code, though I wasn't sure if they belonged in strings.test or keys.test.

parente commented 11 years ago

Made test case check for truthiness to account for 1 from mock and OK from Redis. Not sure why other tests aren't having this problem considering I'm just using the existing set and expire methods.