@@ -26,27 +26,31 @@ describe('server', () => {
2626 } ) ;
2727
2828 it ( 'support http basic authentication with masterkey' , done => {
29- request . get ( {
30- url : 'http://localhost:8378/1/classes/TestObject' ,
31- headers : {
32- 'Authorization' : 'Basic ' + new Buffer ( 'test:' + 'test' ) . toString ( 'base64' )
33- }
34- } , ( error , response , body ) => {
35- expect ( response . statusCode ) . toEqual ( 200 ) ;
36- done ( ) ;
37- } ) ;
29+ reconfigureServer ( { appId : 'test' } ) . then ( ( ) => {
30+ request . get ( {
31+ url : 'http://localhost:8378/1/classes/TestObject' ,
32+ headers : {
33+ 'Authorization' : 'Basic ' + new Buffer ( 'test:' + 'test' ) . toString ( 'base64' )
34+ }
35+ } , ( error , response , body ) => {
36+ expect ( response . statusCode ) . toEqual ( 200 ) ;
37+ done ( ) ;
38+ } ) ;
39+ } )
3840 } ) ;
3941
4042 it ( 'support http basic authentication with javascriptKey' , done => {
41- request . get ( {
42- url : 'http://localhost:8378/1/classes/TestObject' ,
43- headers : {
44- 'Authorization' : 'Basic ' + new Buffer ( 'test:javascript-key=' + 'test' ) . toString ( 'base64' )
45- }
46- } , ( error , response , body ) => {
47- expect ( response . statusCode ) . toEqual ( 200 ) ;
48- done ( ) ;
49- } ) ;
43+ reconfigureServer ( { appId : 'test' } ) . then ( ( ) => {
44+ request . get ( {
45+ url : 'http://localhost:8378/1/classes/TestObject' ,
46+ headers : {
47+ 'Authorization' : 'Basic ' + new Buffer ( 'test:javascript-key=' + 'test' ) . toString ( 'base64' )
48+ }
49+ } , ( error , response , body ) => {
50+ expect ( response . statusCode ) . toEqual ( 200 ) ;
51+ done ( ) ;
52+ } ) ;
53+ } )
5054 } ) ;
5155
5256 it ( 'fails if database is unreachable' , done => {
0 commit comments