We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5dca238 commit fa05c97Copy full SHA for fa05c97
tests/emptyInstance.ts
@@ -73,5 +73,18 @@ export function emptyInstance(repository: any) {
73
74
// Note: Populate should not work in this case
75
});
76
+
77
+ it('should create empty instance', async function () {
78
+ await PersonModel.findAndDelete({});
79
+ await OrganizationModel.findAndDelete({});
80
81
+ const org = OrganizationModel({}, {});
82
+ await org.save();
83
+ const org2 = OrganizationModel({}, {uri: "http://orgTest2"});
84
+ await org2.save();
85
86
+ const orgs = await OrganizationModel.find({});
87
+ expect(orgs).length(2);
88
+ });
89
}
90
0 commit comments