@@ -18,6 +18,8 @@ debug('replay localhosts', replay._localhosts);
1818 \"TLS server: In state wait_finished received CLIENT ALERT: Fatal - Certificate Unknown\\n\"}}}"
1919 */
2020let destination = 'http://admin:none@localhost:5984' ;
21+ const couchUrl = destination . replace ( 'admin:none@' , '' ) ;
22+
2123if ( ! destination ) {
2224 destination = url . parse ( config . usersDbConnection . url ) ;
2325 destination . auth = `${ config . couchKeys . username } :${ config . couchKeys . password } ` ;
@@ -525,19 +527,38 @@ describe('install', () => {
525527 expect ( res . body . ok ) . to . equal ( true ) ;
526528
527529 return supertest ( destination )
530+ . put ( `/${ dbnameToReplicate } /_security` )
531+ . set ( 'cookie' , adminSessionCookie )
532+ . set ( 'Accept' , 'application/json' )
533+ . send ( {
534+ "members" :{ "roles" :[ ] } ,
535+ "admins" :{ "roles" :[ "_admin" ] }
536+ } )
537+ } )
538+ . then ( ( res ) => {
539+ expect ( res . body . ok ) . to . equal ( true ) ;
540+
541+ return supertest ( couchUrl )
528542 . get ( `/${ dbnameToReplicate } /_design/prototype` )
529543 . set ( 'Accept' , 'application/json' ) ;
530544 } )
531545 . then ( ( res ) => {
532546 debug ( 'res.body prototype after ' , res . body ) ;
533547 expect ( res . body . couchapp && res . body . couchapp . name ) . to . contain ( 'Prototype (has the most features of the apps)' , JSON . stringify ( res . body ) ) ;
534548
535- return supertest ( destination )
549+ return supertest ( couchUrl )
536550 . get ( `/${ dbnameToReplicate } /_design/prototype/user.html` ) ;
537551 } )
538552 . then ( ( res ) => {
539553 debug ( 'res.body prototype after ' , res . body ) ;
540554 expect ( res . status ) . to . equal ( 200 ) ;
555+
556+ return supertest ( couchUrl )
557+ . get ( `/${ dbnameToReplicate } /_design/prototype/app/app.css` ) ;
558+ } )
559+ . then ( ( res ) => {
560+ debug ( 'attachments prototype after ' , res . body ) ;
561+ expect ( res . status ) . to . equal ( 200 ) ;
541562 } ) ;
542563 } ) ;
543564 } ) ;
0 commit comments