不要怂,就是干,撸起袖子干!

Commit 8fdaf157 by Bart Nagel

that's an xnor operation, not xor

1 parent cab315a3
Showing with 3 additions and 3 deletions
......@@ -319,9 +319,9 @@ describe(Helpers.getTestDialectTeaser("DAO"), function() {
}
}, {
validate: {
xor: function() {
xnor: function() {
if ((this.field1 === null) === (this.field2 === null)) {
throw new Error('xor failed');
throw new Error('xnor failed');
}
}
}
......@@ -330,7 +330,7 @@ describe(Helpers.getTestDialectTeaser("DAO"), function() {
var failingFoo = Foo.build({ field1: null, field2: null })
, errors = failingFoo.validate()
expect(errors).not.toBeNull()
expect(errors).toEqual({ '__model': ['xor failed'] })
expect(errors).toEqual({ '__model': ['xnor failed'] })
var successfulFoo = Foo.build({ field1: 33, field2: null })
expect(successfulFoo.validate()).toBeNull()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!