-/* tslint:disable:no-unused-expression */
+/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import 'mocha'
import * as chai from 'chai'
})
expect(res.text).to.contain('xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"')
- expect(res.text).to.contain('<url><loc>http://localhost:9001/about/instance</loc></url>')
+ expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/about/instance</loc></url>')
})
it('Should get the empty cached sitemap', async function () {
})
expect(res.text).to.contain('xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"')
- expect(res.text).to.contain('<url><loc>http://localhost:9001/about/instance</loc></url>')
+ expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/about/instance</loc></url>')
})
it('Should add videos, channel and accounts and get sitemap', async function () {
})
expect(res.text).to.contain('xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"')
- expect(res.text).to.contain('<url><loc>http://localhost:9001/about/instance</loc></url>')
+ expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/about/instance</loc></url>')
- expect(res.text).to.contain('<video:title><![CDATA[video 1]]></video:title>')
- expect(res.text).to.contain('<video:title><![CDATA[video 2]]></video:title>')
- expect(res.text).to.not.contain('<video:title><![CDATA[video 3]]></video:title>')
+ expect(res.text).to.contain('<video:title>video 1</video:title>')
+ expect(res.text).to.contain('<video:title>video 2</video:title>')
+ expect(res.text).to.not.contain('<video:title>video 3</video:title>')
- expect(res.text).to.contain('<url><loc>http://localhost:9001/video-channels/channel1</loc></url>')
- expect(res.text).to.contain('<url><loc>http://localhost:9001/video-channels/channel2</loc></url>')
+ expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/video-channels/channel1</loc></url>')
+ expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/video-channels/channel2</loc></url>')
- expect(res.text).to.contain('<url><loc>http://localhost:9001/accounts/user1</loc></url>')
- expect(res.text).to.contain('<url><loc>http://localhost:9001/accounts/user2</loc></url>')
+ expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/accounts/user1</loc></url>')
+ expect(res.text).to.contain('<url><loc>http://localhost:' + server.port + '/accounts/user2</loc></url>')
})
})