aboutsummaryrefslogtreecommitdiff
path: root/src/tests/api
diff options
context:
space:
mode:
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);
+ }
+});