Skip to content

Commit

Permalink
Dot notation is now able to go inside arrays and array indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
louischatriot committed Dec 1, 2013
1 parent 9c26c41 commit 34352b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/model.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -910,9 +910,9 @@ describe('Model', function () {
});

it("Can match for field equality inside an array with the dot notation", function () {
mode.match({ a: true, b: [ 'node', 'embedded', 'database' ] }, { 'b.1': 'node' }).should.equal(false);
mode.match({ a: true, b: [ 'node', 'embedded', 'database' ] }, { 'b.1': 'embedded' }).should.equal(true);
mode.match({ a: true, b: [ 'node', 'embedded', 'database' ] }, { 'b.1': 'database' }).should.equal(false);
model.match({ a: true, b: [ 'node', 'embedded', 'database' ] }, { 'b.1': 'node' }).should.equal(false);
model.match({ a: true, b: [ 'node', 'embedded', 'database' ] }, { 'b.1': 'embedded' }).should.equal(true);
model.match({ a: true, b: [ 'node', 'embedded', 'database' ] }, { 'b.1': 'database' }).should.equal(false);
})

});
Expand Down

0 comments on commit 34352b5

Please sign in to comment.