Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[test] Test to make sure atleast the children are destroyed

  • Loading branch information...
commit 3aeec9b4a90b615842cd616ca14c3e6a18ca4e78 1 parent e99e621
@pksunkara pksunkara authored
View
2  package.json
@@ -35,7 +35,7 @@
},
"scripts": {
"browserify": "browserify lib/browser.js -o build/resourceful.js",
- "test": "vows --spec --isolate"
+ "test": "vows --spec"
}
}
View
6 test/macros/relationship.js
@@ -77,7 +77,7 @@ macros.defineResources = function (e, resources) {
return resources[e].Membership = resourceful.define('membership', function() {
this.use(e.name, e.options);
this.string('team');
- this.parent('User');
+ // this.parent('User');
});
},
'will be successful': function (resource) {
@@ -89,7 +89,7 @@ macros.defineResources = function (e, resources) {
return resources[e].Follower = resourceful.define('follower', function() {
this.use(e.name, e.options);
this.string('user');
- this.parent('User');
+ // this.parent('User');
});
},
'will be successful': function (resource) {
@@ -101,7 +101,7 @@ macros.defineResources = function (e, resources) {
return resources[e].Following = resourceful.define('following', function() {
this.use(e.name, e.options);
this.string('user');
- this.parent('User');
+ // this.parent('User');
});
},
'will be successful': function (resource) {
View
5 test/relationship-test.js
@@ -360,6 +360,9 @@ engines.forEach(function (e) {
topic: function (parent, child) {
child.destroy(this.callback);
},
+ "should be successful": function (err) {
+ assert.isTrue(err.ok);
+ },
"should result in parent": {
topic: function () {
resources[e].User.get('christian', this.callback);
@@ -394,7 +397,7 @@ engines.forEach(function (e) {
obj.destroy(this.callback);
},
"should be successful": function (err) {
- assert.isNull(err);
+ assert.isTrue(err.ok);
},
"should result in his repositories": {
topic: function () {
Please sign in to comment.
Something went wrong with that request. Please try again.