diff options
Diffstat (limited to 'vnext/server/middleware/android.spec.js')
-rw-r--r-- | vnext/server/middleware/android.spec.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/vnext/server/middleware/android.spec.js b/vnext/server/middleware/android.spec.js index 448714ac..19d380d7 100644 --- a/vnext/server/middleware/android.spec.js +++ b/vnext/server/middleware/android.spec.js @@ -1,15 +1,11 @@ import request from 'supertest' -import express from 'express' -import releases from './android' - -const app = express() -app.get('/releases', releases) +import { app } from '../app' describe('Releases helper', () => { it('Should respond with empty array to unknown user agents', async () => { return request(app) - .get('/releases') + .get('/api/apps/android/releases') .expect(200) .then(response => { expect(response.body).toStrictEqual([]) @@ -17,7 +13,7 @@ describe('Releases helper', () => { }) it('Should respond with a single legacy version data to old Android app', async () => { return request(app) - .get('/releases') + .get('/api/apps/android/releases') .set('User-Agent', 'Juick/100 okhttp/3.12 Android/19') .expect(200) .then(response => { @@ -27,7 +23,7 @@ describe('Releases helper', () => { }) it('Should redirect to Github when Android version is ok', async () => { return request(app) - .get('/releases') + .get('/api/apps/android/releases') .set('User-Agent', 'Juick/100 okhttp/3.12 Android/24') .expect(302) .then(response => { |