mailosaur / mailosaur-node

Mailosaur email and SMS testing library for Node.js
https://mailosaur.com/docs/languages/nodejs/
MIT License
20 stars 13 forks source link

itemsPerPage and receivedAfter filters don't work #23

Closed vikmaksymenko closed 4 years ago

vikmaksymenko commented 5 years ago

itemsPerPage usage leads to 400 error receivedAfter is ignored.

See tests in https://github.com/mailosaur/mailosaur-node/pull/22

Result :

 1) emails search by itemsPerPage should return 2 messages in result:
     Error: Operation returned an invalid status code '400'
      at Request.self.client.request.post [as _callback] (/home/vmaksimenko/utor/mailosaur-node/lib/operations/messages.js:392:29)
      at Request.self.callback (/home/vmaksimenko/utor/mailosaur-node/node_modules/request/request.js:186:22)
      at Request.emit (events.js:197:13)
      at Request.<anonymous> (/home/vmaksimenko/utor/mailosaur-node/node_modules/request/request.js:1163:10)
      at Request.emit (events.js:197:13)
      at IncomingMessage.<anonymous> (/home/vmaksimenko/utor/mailosaur-node/node_modules/request/request.js:1085:12)
      at Object.onceWrapper (events.js:285:13)
      at IncomingMessage.emit (events.js:202:15)
      at endReadableNT (_stream_readable.js:1129:12)
      at processTicksAndRejections (internal/process/next_tick.js:76:17)

  2) emails search by receivedAfter should retuArn 2 messages in result:

      actual expected

      07

      at client.messages.search.then (/home/vmaksimenko/utor/mailosaur-node/test/emails.js:261:32)
      at processTicksAndRejections (internal/process/next_tick.js:81:5)