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

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

Build:
Build:
LAST BUILD BRANCH: story-2-user-registration
DEFAULT BRANCH: master
Ran 23 May 2019 05:35PM UTC
Files 96
Run time 5s
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

23 May 2019 05:32PM UTC coverage: 91.045%. Remained the same
NODE_ENV=test SESSION_SECRET=secret IMAGES_BASE_URL=http://example.com/travis

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%)

27.73 hits per line

Source Files on job 289.1 (NODE_ENV=test SESSION_SECRET=secret IMAGES_BASE_URL=http://example.com/travis)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 253
  • Travis Job 289.1
  • a864b60e on github
  • Prev Job for NODE_ENV=test SESSION_SECRET=secret IMAGES_BASE_URL=http://example.com/travis on story-2-user-registration (#287.2)
  • Next Job for NODE_ENV=test SESSION_SECRET=secret IMAGES_BASE_URL=http://example.com/travis on story-2-user-registration (#291.2)
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