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 1
1
describe ( 'a db module' , function ( ) {
2
2
3
3
var db = require ( '../../src/db.js' ) ;
4
+ var runtime = require ( '../../src/runtime.js' ) ;
5
+
6
+ runtime . system ( 'test' ) ;
4
7
5
8
it ( 'can find all document of a collection' , function ( ) {
6
9
var result = db . _Runtime . find ( ) ;
@@ -86,11 +89,9 @@ describe('a db module', function () {
86
89
var result = null ;
87
90
88
91
result = db . exportSystem ( ) ;
89
-
90
92
expect ( result ) . toBeDefined ( ) ;
91
93
} ) ;
92
94
93
-
94
95
it ( 'can apply a filter on the export' , function ( ) {
95
96
var result = null ;
96
97
@@ -99,6 +100,25 @@ describe('a db module', function () {
99
100
expect ( result ) . toBeDefined ( ) ;
100
101
} ) ;
101
102
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
+
102
122
it ( 'can init the database' , function ( ) {
103
123
var result = null ;
104
124
You can’t perform that action at this time.
0 commit comments