aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/client.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/client.ts')
-rw-r--r--server/tests/client.ts14
1 files changed, 5 insertions, 9 deletions
diff --git a/server/tests/client.ts b/server/tests/client.ts
index 39ba5fdf6..e0dae2b5e 100644
--- a/server/tests/client.ts
+++ b/server/tests/client.ts
@@ -134,11 +134,9 @@ describe('Test a client controllers', function () {
134 expectedStatus: HttpStatusCode.OK_200 134 expectedStatus: HttpStatusCode.OK_200
135 }) 135 })
136 136
137 const port = servers[0].port 137 const expectedLink = `<link rel="alternate" type="application/json+oembed" href="${servers[0].url}/services/oembed?` +
138 138 `url=http%3A%2F%2F${servers[0].hostname}%3A${servers[0].port}%2Fw%2F${servers[0].store.video.shortUUID}" ` +
139 const expectedLink = '<link rel="alternate" type="application/json+oembed" href="http://localhost:' + port + '/services/oembed?' + 139 `title="${servers[0].store.video.name}" />`
140 `url=http%3A%2F%2Flocalhost%3A${port}%2Fw%2F${servers[0].store.video.shortUUID}" ` +
141 `title="${servers[0].store.video.name}" />`
142 140
143 expect(res.text).to.contain(expectedLink) 141 expect(res.text).to.contain(expectedLink)
144 } 142 }
@@ -155,10 +153,8 @@ describe('Test a client controllers', function () {
155 expectedStatus: HttpStatusCode.OK_200 153 expectedStatus: HttpStatusCode.OK_200
156 }) 154 })
157 155
158 const port = servers[0].port 156 const expectedLink = `<link rel="alternate" type="application/json+oembed" href="${servers[0].url}/services/oembed?` +
159 157 `url=http%3A%2F%2F${servers[0].hostname}%3A${servers[0].port}%2Fw%2Fp%2F${playlist.shortUUID}" ` +
160 const expectedLink = '<link rel="alternate" type="application/json+oembed" href="http://localhost:' + port + '/services/oembed?' +
161 `url=http%3A%2F%2Flocalhost%3A${port}%2Fw%2Fp%2F${playlist.shortUUID}" ` +
162 `title="${playlistName}" />` 158 `title="${playlistName}" />`
163 159
164 expect(res.text).to.contain(expectedLink) 160 expect(res.text).to.contain(expectedLink)