 
     .catch (errors) ->
       t.ok errors?.length is 1, 'Should have gotten one error'
-      t.ok errors[0].message.login[0].indexOf('taken' isnt -1), 'Login error should mention "taken"'
-      t.ok errors[0].message.email[0].indexOf('taken' isnt -1), 'Email error should mention "taken"'
+      t.ok errors[0].message.login[0].indexOf('taken') isnt -1, 'Login error should mention "taken"'
+      t.ok errors[0].message.email[0].indexOf('taken') isnt -1, 'Email error should mention "taken"'
 
 test 'Signing in with an unknown login fails', (t) ->
   BAD_LOGIN =


    .catch (errors) ->
      t.ok errors?.length is 1, 'Should have gotten one error'
      t.ok errors[0].message.password[0].indexOf('short' isnt -1), 'Password error should mention "short"'

test 'Registering a new account works', (t) ->
  GOOD_REGISTRATION =

    .catch (errors) ->
      t.ok errors?.length is 1, 'Should have gotten one error'
      # NOTE: A bad login should return the same error as a bad password.
      t.ok errors[0].message.password.indexOf('incorrect') isnt -1, 'Password error should mention "incorrect"'

test 'Signing in with the wrong password fails', (t) ->
  BAD_PASSWORD =
