File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,29 @@ describe('open/close', function() {
3030 helper . deleteFile ( 'test/tmp/test_create.db' ) ;
3131 } ) ;
3232 } ) ;
33+
34+ describe ( 'open and close non-existant shared database' , function ( ) {
35+ before ( function ( ) {
36+ helper . deleteFile ( 'test/tmp/test_create_shared.db' ) ;
37+ } ) ;
38+
39+ var db ;
40+ it ( 'should open the database' , function ( done ) {
41+ db = new sqlite3 . Database ( 'test/tmp/test_create_shared.db' , sqlite3 . OPEN_SHAREDCACHE | sqlite3 . SQLITE_OPEN_MEMORY , done ) ;
42+ } ) ;
43+
44+ it ( 'should close the database' , function ( done ) {
45+ db . close ( done ) ;
46+ } ) ;
47+
48+ it ( 'should have created the file' , function ( ) {
49+ assert . fileExists ( 'test/tmp/test_create_shared.db' ) ;
50+ } ) ;
51+
52+ after ( function ( ) {
53+ helper . deleteFile ( 'test/tmp/test_create_shared.db' ) ;
54+ } ) ;
55+ } ) ;
3356
3457 it ( 'should not be unable to open an inaccessible database' , function ( done ) {
3558 // NOTE: test assumes that the user is not allowed to create new files
You can’t perform that action at this time.
0 commit comments