Skip to content

Commit

Permalink
Acceptance test fixes for ember 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike North committed Aug 24, 2015
1 parent f6c25f3 commit aa3502b
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cache:
env:
- EMBER_TRY_SCENARIO=ember-1.11
- EMBER_TRY_SCENARIO=ember-1.12
- EMBER_TRY_SCENARIO=ember-1.13
# - EMBER_TRY_SCENARIO=ember-1.13
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- ALLOW_DEPRECATIONS=true EMBER_TRY_SCENARIO=ember-canary
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ember-api-actions",
"dependencies": {
"ember": "1.13.9",
"ember": "1.13.7",
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-data": "1.0.0-beta.19",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"devDependencies": {
"broccoli-asset-rev": "^2.1.2",
"ember-cli": "1.13.8",
"ember-cli-app-version": "0.5.1",
"ember-cli-app-version": "0.5.0",
"ember-cli-content-security-policy": "0.4.0",
"ember-cli-dependency-checker": "^1.0.1",
"ember-cli-github-pages": "0.0.6",
Expand All @@ -35,7 +35,7 @@
"ember-data": "1.0.0-beta.19",
"ember-disable-prototype-extensions": "^1.0.0",
"ember-disable-proxy-controllers": "^1.0.0",
"ember-export-application-global": "^1.0.3",
"ember-export-application-global": "^1.0.4",
"ember-suave": "1.0.0",
"ember-try": "0.0.8"
},
Expand Down
45 changes: 40 additions & 5 deletions tests/dummy/app/routes/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import Ember from 'ember';
import Pretender from 'pretender';

export default Ember.Route.extend({

model() {
return Ember.A(this.store.pushMany('fruit', [{
const LEGACY_PAYLOAD = {
'fruit': [
{
id: 1,
name: 'apple'
}, {
Expand All @@ -16,7 +15,43 @@ export default Ember.Route.extend({
}, {
id: 4,
name: 'grape'
}]));
}
]
};

const PAYLOAD = {
data: [{
type: 'fruit',
id: 1,
attributes: {
name: 'apple'
}
}, {
type: 'fruit',
id: 2,
attributes: {
name: 'pear'
}
}, {
type: 'fruit',
id: 3,
attributes: {
name: 'orange'
}
}, {
type: 'fruit',
id: 4,
attributes: {
name: 'grape'
}
}]
};

export default Ember.Route.extend({

model() {
this.store.pushPayload('fruit', this.store.pushMany ? LEGACY_PAYLOAD : PAYLOAD);
return Ember.A(this.store.pushMany ? [1, 2, 3, 4].map(id => this.store.getById('fruit', id)) : this.store.peekAll('fruit'));
// return this.get('store').findAll('fruit');
},

Expand Down

0 comments on commit aa3502b

Please sign in to comment.