Skip to content

Commit 24e51a5

Browse files
deiunicola
authored andcommitted
Moved the cors tests to the right place
1 parent 6fe306c commit 24e51a5

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

test/http.js

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

8484
describe('GET Root container', function () {
85-
it('should set the proper CORS headers',
86-
function (done) {
87-
server.options('/')
88-
.set('Origin', 'http://example.com')
89-
.expect('Access-Control-Allow-Origin', 'http://example.com')
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)
94-
})
9585
it('should exist', function (done) {
9686
server.get('/')
9787
.expect(200, done)
@@ -104,6 +94,17 @@ describe('HTTP APIs', function () {
10494
})
10595

10696
describe('OPTIONS API', function () {
97+
it('should set the proper CORS headers',
98+
function (done) {
99+
server.options('/')
100+
.set('Origin', 'http://example.com')
101+
.expect('Access-Control-Allow-Origin', 'http://example.com')
102+
.expect('Access-Control-Allow-Credentials', 'true')
103+
.expect('Access-Control-Allow-Methods', 'OPTIONS,HEAD,GET')
104+
.expect('Access-Control-Expose-Headers', 'User, Location, Link, Vary, Last-Modified, ETag, Accept-Patch, Content-Length')
105+
.expect(204, done)
106+
})
107+
107108
it('should have an empty response', function (done) {
108109
server.options('/sampleContainer/example1.ttl')
109110
.expect(emptyResponse)

0 commit comments

Comments
 (0)