Skip to content

Commit

Permalink
tests passing after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
samselikoff committed Jun 8, 2015
1 parent 8e631bd commit 4fa5005
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion addon/orm/db.js
Expand Up @@ -247,7 +247,7 @@ export default function(initialData) {

Object.keys(query).forEach(function(queryKey) {
records = records.filter(function(record) {
return record[queryKey] === query[queryKey];
return String(record[queryKey]) === String(query[queryKey]);
});
});

Expand Down
6 changes: 3 additions & 3 deletions tests/unit/db-test.js
Expand Up @@ -242,7 +242,7 @@ test('returns an array of records that match the query', function(assert) {
});

test('it coerces query params to strings', function(assert) {
var result = db.contacts.where({age: "45"});
var result = db.contacts.where({age: '45'});

assert.deepEqual(result, [
{id: 3, name: 'Ganon', evil: true, age: 45}
Expand All @@ -253,13 +253,13 @@ test('returns a copy, not a referecne', function(assert) {
var result = db.contacts.where({evil: true});

assert.deepEqual(result, [
{id: 3, name: 'Ganon', evil: true}
{id: 3, name: 'Ganon', evil: true, age: 45}
]);

result[0].evil = false;

assert.deepEqual(db.contacts.where({evil: true}), [
{id: 3, name: 'Ganon', evil: true}
{id: 3, name: 'Ganon', evil: true, age: 45}
]);
});

Expand Down

0 comments on commit 4fa5005

Please sign in to comment.