@@ -8,7 +8,8 @@ var path = require('path')
88
99var suffixAcl = '.acl'
1010var suffixMeta = '.meta'
11- var ldpServer = ldnode ( {
11+ var ldpServer = ldnode . createServer ( {
12+ live : true ,
1213 root : path . join ( __dirname , '/resources' )
1314} )
1415var server = supertest ( ldpServer )
@@ -193,6 +194,11 @@ describe('HTTP APIs', function () {
193194 . expect ( 'Link' , / < h t t p : \/ \/ w w w .w 3 .o r g \/ n s \/ l d p # R e s o u r c e > ; r e l = " t y p e " / )
194195 . expect ( 200 , done )
195196 } )
197+ it ( 'should have set Updates-Via to use WebSockets' , function ( done ) {
198+ server . get ( '/sampleContainer/example1.ttl' )
199+ . expect ( 'updates-via' , / w s s ? : \/ \/ / )
200+ . expect ( 200 , done )
201+ } )
196202 it ( 'should have set acl and describedBy Links for resource' ,
197203 function ( done ) {
198204 server . get ( '/sampleContainer/example1.ttl' )
@@ -310,6 +316,11 @@ describe('HTTP APIs', function () {
310316 . expect ( emptyResponse )
311317 . expect ( 200 , done )
312318 } )
319+ it ( 'should have set Updates-Via to use WebSockets' , function ( done ) {
320+ server . get ( '/sampleContainer/example1.ttl' )
321+ . expect ( 'updates-via' , / w s s ? : \/ \/ / )
322+ . expect ( 200 , done )
323+ } )
313324 it ( 'should have set Link as Resource' , function ( done ) {
314325 server . head ( '/sampleContainer/example1.ttl' )
315326 . expect ( 'Link' , / < h t t p : \/ \/ w w w .w 3 .o r g \/ n s \/ l d p # R e s o u r c e > ; r e l = " t y p e " / )
0 commit comments