Skip to content

Instantly share code, notes, and snippets.

@dearfrankg
Created November 13, 2015 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dearfrankg/47fc088b0c3b01feb03d to your computer and use it in GitHub Desktop.
Save dearfrankg/47fc088b0c3b01feb03d to your computer and use it in GitHub Desktop.
frankg@ubuntu:~/dev/test/activator$ node -v
v4.2.2
frankg@ubuntu:~/dev/test/activator$ npm -v
2.14.7
frankg@ubuntu:~/dev/test/activator$
frankg@ubuntu:~/dev/test/activator$ npm test
> activator@1.1.0 test /home/frankg/dev/test/activator
> mocha
(node) child_process: options.customFds option is deprecated. Use options.stdio instead.
activator
not initialized
✓ activate should send 500 (81ms)
✓ completeactivate should send 500
✓ passwordreset should send 500
✓ completepasswordreset should send 500
✓ activatenext should send 500
✓ completeactivatenext should send 500
✓ passwordresetnext should send 500
✓ completepasswordresetnext should send 500
initialized
with string transport
activate
✓ should send 500 for user property not added
✓ should fail for known user but bad code (187ms)
✓ should fail for known user but bad code with handler (68ms)
✓ should succeed for known user (74ms)
✓ should succeed for known user with handler (64ms)
password reset
✓ should send 400 for no email or ID passed
✓ should send 400 for no email or ID passed with handler
✓ should send 404 for unknown email or ID
✓ should send 404 for unknown email or ID with handler
✓ should fail for known email but bad code (68ms)
✓ should fail for known email but bad code with handler (55ms)
✓ should fail for known email with good code but missing new password (56ms)
✓ should fail for known email with good code but missing new password with handler (67ms)
✓ should fail for expired reset code (54ms)
✓ should fail for expired reset code with handler (136ms)
✓ should succeed for known ID (69ms)
✓ should succeed for known ID with handler (59ms)
✓ should succeed for known email (55ms)
✓ should succeed for known email with handler (61ms)
with attachments
✓ should include correct attachment for activate (65ms)
✓ should include correct attachment for passwordreset (51ms)
with email property override
✓ activate should succeed for known user (65ms)
✓ password reset should succeed for known email (56ms)
with id property override
✓ activate should succeed for known user (66ms)
✓ password reset should succeed for known email (79ms)
with html emails
✓ activate should send txt and html (59ms)
✓ password reset should send only html (54ms)
localized
✓ activate should send txt and html for exact match (57ms)
✓ activate should send txt and html fallback to lang (57ms)
✓ activate should send txt and html default for no match (65ms)
with nodemailer transport
activate
✓ should send 500 for user property not added
✓ should fail for known user but bad code (54ms)
✓ should fail for known user but bad code with handler (56ms)
✓ should succeed for known user (54ms)
✓ should succeed for known user with handler (56ms)
password reset
✓ should send 400 for no email or ID passed
✓ should send 400 for no email or ID passed with handler
✓ should send 404 for unknown email or ID
✓ should send 404 for unknown email or ID with handler
✓ should fail for known email but bad code (48ms)
✓ should fail for known email but bad code with handler (52ms)
✓ should fail for known email with good code but missing new password (52ms)
✓ should fail for known email with good code but missing new password with handler (61ms)
✓ should fail for expired reset code (48ms)
✓ should fail for expired reset code with handler (44ms)
✓ should succeed for known ID (52ms)
✓ should succeed for known ID with handler (54ms)
✓ should succeed for known email (68ms)
✓ should succeed for known email with handler (55ms)
with attachments
✓ should include correct attachment for activate (60ms)
✓ should include correct attachment for passwordreset (61ms)
with email property override
✓ activate should succeed for known user (47ms)
✓ password reset should succeed for known email (55ms)
with id property override
✓ activate should succeed for known user (53ms)
✓ password reset should succeed for known email (55ms)
with html emails
✓ activate should send txt and html (62ms)
✓ password reset should send only html (55ms)
localized
✓ activate should send txt and html for exact match (68ms)
✓ activate should send txt and html fallback to lang (55ms)
✓ activate should send txt and html default for no match (67ms)
68 passing (4s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment