Skip to content

Commit d0ecac9

Browse files
deiunicola
authored andcommitted
Updated test
1 parent 1fb6640 commit d0ecac9

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

test/http.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,15 @@ describe('HTTP APIs', function () {
8282
}
8383

8484
describe('GET Root container', function () {
85-
it('should have Access-Control-Allow-Origin as the req.Origin',
85+
it('should set the proper CORS headers',
8686
function (done) {
87-
server.get('/')
87+
server.options('/')
8888
.set('Origin', 'http://example.com')
8989
.expect('Access-Control-Allow-Origin', 'http://example.com')
90-
.expect(200, done)
90+
.expect('Access-Control-Allow-Credentials', 'true')
91+
.expect('Access-Control-Allow-Methods', 'OPTIONS,HEAD,GET')
92+
.expect('Access-Control-Expose-Headers', 'User, Location, Link, Vary, Last-Modified, ETag, Accept-Patch, Content-Length')
93+
.expect(204, done)
9194
})
9295
it('should exist', function (done) {
9396
server.get('/')

0 commit comments

Comments
 (0)