aboutsummaryrefslogtreecommitdiff
path: root/src/tests/api
diff options
context:
space:
mode:
authorPitu <[email protected]>2021-01-04 01:04:20 +0900
committerPitu <[email protected]>2021-01-04 01:04:20 +0900
commitfcd39dc550dec8dbcb8325e07e938c5024cbc33d (patch)
treef41acb4e0d5fd3c3b1236fe4324b3fef9ec6eafe /src/tests/api
parentCreate FUNDING.yml (diff)
parentchore: update todo (diff)
downloadhost.fuwn.me-fcd39dc550dec8dbcb8325e07e938c5024cbc33d.tar.xz
host.fuwn.me-fcd39dc550dec8dbcb8325e07e938c5024cbc33d.zip
Merge branch 'dev'
Diffstat (limited to 'src/tests/api')
-rw-r--r--src/tests/api/verify.test.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tests/api/verify.test.js b/src/tests/api/verify.test.js
new file mode 100644
index 0000000..34bc45e
--- /dev/null
+++ b/src/tests/api/verify.test.js
@@ -0,0 +1,12 @@
+/* eslint-disable no-undef */
+import { axios } from '../utils';
+
+// This should never succeed as we are not passing a token. We are expecting a 401
+test('Verify token', async () => {
+ try {
+ await axios.get('/api/verify');
+ expect(true).toBe(false);
+ } catch (err) {
+ expect(err.response.status).toBe(401);
+ }
+});