@@ -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