Skip to content

Commit a07cdbd

Browse files
author
deiu
committed
Updated tests; they now catch 303s
1 parent 8f38466 commit a07cdbd

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

test/http.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ describe('HTTP APIs', function () {
235235
server.get('/sampleContainer/')
236236
.set('Accept', 'text/html')
237237
.expect('content-type', /text\/html/)
238-
.expect(200, done) // Can't check for 303 because of internal redirects
238+
.expect(303, done)
239239
})
240240
it('should redirect to the right container URI if missing /', function (done) {
241241
server.get('/sampleContainer')
@@ -286,13 +286,8 @@ describe('HTTP APIs', function () {
286286
function (done) {
287287
server.get('/sampleContainer/')
288288
.set('accept', 'text/html')
289-
.expect(200)
289+
.expect(303)
290290
.expect('content-type', /text\/html/)
291-
.expect(function (res) {
292-
if (res.text.indexOf('<!DOCTYPE html>') < 0) {
293-
throw new Error('wrong content returned for index.html')
294-
}
295-
})
296291
.end(done)
297292
})
298293
it('should still redirect to the right container URI if missing / and HTML is requested',

0 commit comments

Comments
 (0)