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..648923e4
--- /dev/null
+++ b/vnext/server/middleware/mastodon.spec.js
@@ -0,0 +1,17 @@
+import request from 'supertest'
+import express from 'express'
+import { instance } from './mastodon'
+
+const app = express()
+app.get('/instance', instance)
+
+describe('Mastodon API middleware', () => {
+ it('Inactive users should not be included in Instance response', async () => {
+ return request(app)
+ .get('/instance')
+ .expect(200)
+ .then(response => {
+ expect(response.body.usage.users.active_month).toStrictEqual(1)
+ })
+ })
+})