Ghost/core/test/unit
Fabien O'Carroll 8046f4d437
🐛 Fix last seen for users (#10141)
* Added updateLastSeen method to user model

refs #10138

* Refactor codebase to use user.updateLastSeen

refs #10138

This is to ensure all updates go via the same method, meaning any
specific logic can be handled in one place, it also helps with grepping
the codebase to find where this occurs

* Created updateUserLastSeen middleware for v2 admin

refs #10138

This is intended to be used with the v2 admin api and _possibly_ the
content api, to give us an accruate report on thelast time a user access
a ghost instance.

* Wired updateUserLastSeen up to v2 Admin API

closes #10138

* Fixed broken test for v2 admin api

no-issue

This test was broken because it was incorrectly testing for a method to
be called exactly once - this was irrelevant to the functionality being
tested for.

* Updated user check method to set status to active

no-issue

* Debounced the updateUserLastSeen middlware an hour

no-issue

* Resolved some PR comments
2018-11-13 18:27:10 +07:00
..
adapters Refactored web/middleware and web/utils to web/shared (#9892) 2018-09-20 20:04:34 +02:00
api 🚧 Added req.member to the v2 api context object 2018-11-08 13:32:41 +07:00
apps Renamed /users to /authors for Content API V2 (#10096) 2018-11-07 15:29:37 +01:00
config Removed old jshint/jscs rules 2018-06-02 21:48:23 +02:00
data Changed casper.ghost.org to static.ghost.org references (#10109) 2018-11-07 15:50:38 +01:00
helpers Renamed /users to /authors for Content API V2 (#10096) 2018-11-07 15:29:37 +01:00
lib Refactored request unit tests to return promises (#10045) 2018-10-24 12:14:44 +07:00
models 🐛 Fix last seen for users (#10141) 2018-11-13 18:27:10 +07:00
public Refactored Ghost SDK unit test 2018-10-05 16:49:46 +02:00
services 🎨 Modified slack webhook payload, added info about published post (#9850) 2018-11-12 13:04:50 +01:00
web 🐛 Fix last seen for users (#10141) 2018-11-13 18:27:10 +07:00
filters_spec.js Tidy up unit test files (#9340) 2017-12-14 03:36:50 +01:00