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.js17
1 files changed, 17 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..7f30d027
--- /dev/null
+++ b/vnext/server/middleware/mastodon.spec.js
@@ -0,0 +1,17 @@
+/**
+ * @jest-environment node
+ */
+
+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)
+ })
+ })
+})