• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MediaComem / biopocket-backend / 289
91%
master: 92%

Build:
Build:
LAST BUILD BRANCH: story-2-user-registration
DEFAULT BRANCH: master
Ran 23 May 2019 05:35PM UTC
Jobs 2
Files 96
Run time 13s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
289

push

travis-ci

AlphaHydrae
Add API route to register a new user

The main added feature is the `POST /api/users` route. Additionally:

* The backend now has a generic mechanism to send emails (see
  development guide).
* In addition to what is required for registration, columns have been
  added to the `users` table to identify the authentication provider.
  Currently there is only the local provider, but in the future there
  may be Facebook, Twitter, etc.
* When a new user registers, the email is reserved until the
  registration process has been completed. However, after the expiration
  of the last generated OTP (the lifespan defaults to 2 hours), new
  registration requests will be accepted for the same email, replacing the
  incomplete registration (i.e. user) in the database.
* JWTs now have authorization scopes (see development guide). This is
  used in the context of user registration: a registration OTP is
  retrieved from the link sent in the registration email. This OTP allows
  a user to obtain a JWT with a special `register` scope. This JWT will
  allow to mark the user's email as verified (in the next PR).
* JWTs with infinite validity can now be generated (see `POST /api/auth`
  documentation).

The following code changes and refactorings have been made:

* The ECMAScript version in `.eslintrc.json` has been increased to
  ECMAScript 2018 to support the object spread operator.
* All mentions of "e-mail" have been replaced by "email".
* All `getExpected*` functions (e.g. `getExpectedUser`) that were in
  `server/spec/utils.js` have been moved to the respective
  `server/spec/expectations/<model>.js` file. This makes more sense as
  they are expectation-related.
* The file `server/spec/utils.js` has been split into several files in
  the new `server/spec/utils` directory. This was necessary to avoid a
  circular dependency.
* Test coverage for the files in `server/api/auth` and
  `server/api/users` has been brought to 100% excluding parts that will
  be completed ... (continued)

713 of 909 branches covered (78.44%)

Branch coverage included in aggregate %.

2886 of 3044 relevant lines covered (94.81%)

55.46 hits per line

Jobs
ID Job ID Ran Files Coverage
1 289.1 (NODE_ENV=test SESSION_SECRET=secret IMAGES_BASE_URL=http://example.com/travis) 23 May 2019 05:35PM UTC 0
91.04
Travis Job 289.1
2 289.2 (NODE_ENV=test SESSION_SECRET=secret IMAGES_BASE_URL=http://example.com/travis) 23 May 2019 05:35PM UTC 0
91.04
Travis Job 289.2
Source Files on build 289
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #289
  • a864b60e on github
  • Prev Build on story-2-user-registration (#287)
  • Next Build on story-2-user-registration (#291)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc