File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 11describe ( 'a db module' , function ( ) {
22
33 var db = require ( '../../src/db.js' ) ;
4+ var runtime = require ( '../../src/runtime.js' ) ;
5+
6+ runtime . system ( 'test' ) ;
47
58 it ( 'can find all document of a collection' , function ( ) {
69 var result = db . _Runtime . find ( ) ;
@@ -86,11 +89,9 @@ describe('a db module', function () {
8689 var result = null ;
8790
8891 result = db . exportSystem ( ) ;
89-
9092 expect ( result ) . toBeDefined ( ) ;
9193 } ) ;
9294
93-
9495 it ( 'can apply a filter on the export' , function ( ) {
9596 var result = null ;
9697
@@ -99,6 +100,25 @@ describe('a db module', function () {
99100 expect ( result ) . toBeDefined ( ) ;
100101 } ) ;
101102
103+ it ( 'can import a system' , function ( ) {
104+ var result = null ;
105+
106+ result = db . importSystem ( {
107+ "_id" : "u195cc1c1dd16c47" ,
108+ "name" : "test2" ,
109+ "description" : "" ,
110+ "version" : "0.0.1" ,
111+ "master" : true ,
112+ "schemas" : { } ,
113+ "models" : { } ,
114+ "types" : { } ,
115+ "behaviors" : { } ,
116+ "components" : { }
117+ } ) ;
118+
119+ expect ( result ) . not . toBe ( '' ) ;
120+ } ) ;
121+
102122 it ( 'can init the database' , function ( ) {
103123 var result = null ;
104124
You can’t perform that action at this time.
0 commit comments