8000 Prepare for 0.7.1 · js-data/js-data-adapter@c03da6a · GitHub
[go: up one dir, main page]

Skip to content

Commit c03da6a

Browse files
committed
Prepare for 0.7.1
1 parent 9621591 commit c03da6a

File tree

4 files changed

+25
-30
lines changed

4 files changed

+25
-30
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
##### 0.7.1 - 16 May 2016
2+
3+
###### Bug fixes
4+
- Fix for findAll tests
5+
16
##### 0.7.0 - 16 May 2016
27

38
###### Breaking changes

package.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "js-data-adapter",
33
"description": "Base adapter class that all other js-data adapters extend."< 10000 /span>,
4-
"version": "0.7.0",
4+
"version": "0.7.1",
55
"homepage": "https://github.com/js-data/js-data-adapter",
66
"repository": {
77
"type": "git",
@@ -72,15 +72,7 @@
7272
"devDependencies": {
7373
"babel-plugin-syntax-async-functions": "6.8.0",
7474
"babel-plugin-transform-regenerator": "6.8.0",
75-
"babel-polyfill": "6.8.0",
76-
"babel-preset-es2015": "^6.6.0",
77-
"babel-preset-es2015-rollup": "1.1.1",
7875
"babel-preset-stage-0": "6.5.0",
79-
"js-data-repo-tools": "0.5.1",
80-
"nyc": "6.4.4",
81-
"rollup": "0.26.3",
82-
"rollup-plugin-babel": "2.4.0",
83-
"source-map-support": "0.4.0",
84-
"watch": "0.18.0"
76+
"js-data-repo-tools": "0.5.2"
8577
}
8678
}

test/findAll.test.js

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -449,44 +449,45 @@ export default function (options) {
449449

450450
if (options.hasFeature('findAllGroupedWhere')) {
451451
it('should support filtering grouped "where" clauses', async function () {
452-
const PostCollection = adapter.getCollection(Post)
453-
const post1 = PostCollection.add({ author: 'John', age: 30, id: 5, roles: ['admin'] })
454-
PostCollection.add({ author: 'Sally', age: 31, id: 6, roles: ['admin', 'dev'] })
455-
const post3 = PostCollection.add({ author: 'Mike', age: 32, id: 7, roles: ['admin', 'dev'] })
456-
PostCollection.add({ author: 'Adam', age: 33, id: 8, roles: [] })
457-
const post5 = PostCollection.add({ author: 'Adam', age: 33, id: 9, roles: ['admin', 'dev', 'owner'] })
452+
const posts = await adapter.createMany(Post, [
453+
{ status: 'draft', content: 'foo' },
454+
{ status: 'broken', content: 'bar' },
455+
{ status: 'published', content: 'hi' },
456+
{ status: 'flagged', content: 'hello wo 10000 rld' },
457+
{ status: 'flagged', content: 'test' }
458+
])
458459

459460
let query = {
460461
where: [
461462
[
462463
{
463-
roles: {
464-
'contains': 'admin'
464+
content: {
465+
'=': 'foo'
465466
},
466-
age: {
467-
'=': 30
467+
status: {
468+
'=': 'draft'
468469
}
469470
},
470471
'or',
471472
{
472-
author: {
473-
'=': 'Mike'
473+
status: {
474+
'=': 'published'
474475
}
475476
}
476477
],
477478
'or',
478479
{
479-
roles: {
480-
'contains': 'owner'
480+
content: {
481+
'=': 'test'
481482
},
482-
age: {
483-
'=': 33
483+
status: {
484+
'=': 'flagged'
484485
}
485486
}
486487
]
487488
}
488489

489-
assert.objectsEqual(await adapter.findAll(Post, query), [post1, post3, post5])
490+
assert.objectsEqual(await adapter.findAll(Post, query), [posts[0], posts[2], posts[4]])
490491
})
491492
}
492493
})

test/mockAdapter.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,5 @@ addHiddenPropsToTarget(MockAdapter.prototype, {
125125
records[i] = collection.add(record)
126126
})
127127
return [records, {}]
128-
},
129-
getCollection (mapper) {
130-
return getCollection(mapper)
131128
}
132129
})

0 commit comments

Comments
 (0)
0