Permalink
Browse files

Fix tests on nested records

  • Loading branch information...
1 parent e4d29c5 commit 89cfec74df16fe0947f9b4253b171abcbeb0afc2 @drogus drogus committed with wagenet May 27, 2011
@@ -9,7 +9,7 @@
//
var NestedRecord, store, testParent, testParent2, childData1;
-var initModels = function(){
+var initModels = function() {
NestedRecord.ParentRecordTest = SC.Record.extend({
/** Child Record Namespace */
nestedRecordNamespace: NestedRecord,
@@ -34,6 +34,7 @@ module("Basic SC.Record Functions w/ Parent > Child", {
NestedRecord = SC.Object.create({
store: SC.Store.create()
});
+ window.NestedRecord = NestedRecord;
store = NestedRecord.store;
initModels();
SC.RunLoop.begin();
@@ -79,6 +80,7 @@ module("Basic SC.Record Functions w/ Parent > Child", {
store = null;
childData1 = null;
NestedRecord = null;
+ delete(window.NestedRecord);
}
});
@@ -42,6 +42,7 @@ module("Complex SC.Record: Parent > Array of Children > Array of Children", {
NestedRecord = SC.Object.create({
store: SC.Store.create()
});
+ window.NestedRecord = NestedRecord;
store = NestedRecord.store;
initModels();
SC.RunLoop.begin();
@@ -117,6 +118,7 @@ module("Complex SC.Record: Parent > Array of Children > Array of Children", {
delete NestedRecord.Group;
delete NestedRecord.Person;
delete NestedRecord.Address;
+ delete window.NestedRecord;
NestedRecord = null;
testParent = null;
peopleData1 = null;
@@ -42,6 +42,7 @@ module("Basic SC.Record Functions w/ a Parent > Child > Child", {
NestedRecord = SC.Object.create({
store: SC.Store.create()
});
+ window.NestedRecord = NestedRecord;
store = NestedRecord.store;
initModels();
SC.RunLoop.begin();
@@ -65,6 +66,7 @@ module("Basic SC.Record Functions w/ a Parent > Child > Child", {
delete NestedRecord.ParentRecordTest;
delete NestedRecord.Person;
delete NestedRecord.Address;
+ delete window.NestedRecord;
NestedRecord = null;
testParent = null;
store = null;

0 comments on commit 89cfec7

Please sign in to comment.