aboutsummaryrefslogtreecommitdiff
path: root/vnext/server/middleware/mastodon.spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/server/middleware/mastodon.spec.js')
-rw-r--r--vnext/server/middleware/mastodon.spec.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/vnext/server/middleware/mastodon.spec.js b/vnext/server/middleware/mastodon.spec.js
new file mode 100644
index 00000000..561303bc
--- /dev/null
+++ b/vnext/server/middleware/mastodon.spec.js
@@ -0,0 +1,13 @@
+import request from 'supertest'
+import { app } from '../app'
+
+describe('Mastodon API middleware', () => {
+ it('Inactive users should not be included in Instance response', async () => {
+ return request(app)
+ .get('/api/v2/instance')
+ .expect(200)
+ .then(response => {
+ expect(response.body.usage.users.active_month).toStrictEqual(1)
+ })
+ })
+})