Permalink
Browse files

[test] Move all uses of _id to id

  • Loading branch information...
1 parent 0e3b28f commit 4f7f7b10080a43586aa9c96b55817b3eddf68706 @pksunkara pksunkara committed Jul 9, 2012
Showing with 8 additions and 8 deletions.
  1. +1 −1 test/events-test.js
  2. +4 −4 test/hooks-async-test.js
  3. +3 −3 test/validation-test.js
View
@@ -24,7 +24,7 @@ vows.describe('resourceful/events').addBatch({
},
"when calling save() on an instance of Article": {
topic: function (A) {
- new(A)({ _id: '66', title: 'an Article' }).save(this.callback);
+ new(A)({ id: '66', title: 'an Article' }).save(this.callback);
},
"should trigger the bound function": function (e, res) {
assert.isNull(e);
View
@@ -23,7 +23,7 @@ vows.describe('resourceful/hooks/async').addBatch({
},
"when calling save() on an instance of Article": {
topic: function (A) {
- new(A)({ _id: '128', counter: 0, title: 'foobar' }).save(this.callback);
+ new(A)({ id: '128', counter: 0, title: 'foobar' }).save(this.callback);
},
"should trigger both hooks in the right order": function (e, res) {
assert.isNull(e);
@@ -57,7 +57,7 @@ vows.describe('resourceful/hooks/async').addBatch({
},
"when calling save() on an instance of Article": {
topic: function (A) {
- new(A)({ _id: '65', counter: 0, title: 'hookbar' }).save(this.callback);
+ new(A)({ id: '65', counter: 0, title: 'hookbar' }).save(this.callback);
},
"should trigger both hooks in the right order": function (e, res) {
assert.isNull(e);
@@ -97,7 +97,7 @@ vows.describe('resourceful/hooks/async').addBatch({
},
"when calling create() on an instance of Article": {
topic: function (A) {
- A.create({ _id: '69', counter: 0, title: 'foobar' }, this.callback);
+ A.create({ id: '69', counter: 0, title: 'foobar' }, this.callback);
},
"should trigger all hooks": function (e, res) {
assert.isNull(e);
@@ -152,7 +152,7 @@ vows.describe('resourceful/hooks/async').addBatch({
},
"when calling create() on an instance of Article": {
topic: function (A) {
- A.create({ _id: '67', counter: 0, title: 'hookbar' }, this.callback);
+ A.create({ id: '67', counter: 0, title: 'hookbar' }, this.callback);
},
"should trigger both hooks in the right order": function (e, res) {
assert.isNull(e);
View
@@ -4,12 +4,12 @@ var assert = require('assert'),
var users = {
valid: {
- _id: 'valid-user',
+ id: 'valid-user',
email: 'valid@email.com',
name: 'valid string'
},
invalid: {
- _id: 'invalid-user',
+ id: 'invalid-user',
email: 'invalid-email@123',
name: 123
}
@@ -91,4 +91,4 @@ vows.describe('resourceful/validation').addBatch({
}
}
-}).export(module);
+}).export(module);

0 comments on commit 4f7f7b1

Please sign in to comment.