Skip to content

Commit

Permalink
[BUGFIX beta] Update route-recognizer to v0.2.8.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanhammond committed Oct 30, 2016
1 parent d37d38b commit 431449b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"mocha": "^2.4.5",
"qunit-extras": "^1.5.0",
"qunitjs": "^1.22.0",
"route-recognizer": "^0.2.7",
"route-recognizer": "^0.2.8",
"rsvp": "~3.2.1",
"serve-static": "^1.10.0",
"simple-dom": "^0.3.0",
Expand Down
16 changes: 13 additions & 3 deletions packages/ember/tests/helpers/link_to_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1252,15 +1252,23 @@ QUnit.test('the {{link-to}} helper does not call preventDefault if `preventDefau
QUnit.test('the {{link-to}} helper does not throw an error if its route has exited', function() {
expect(0);

setTemplate('application', compile("{{#link-to 'index' id='home-link'}}Home{{/link-to}}{{#link-to 'post' defaultPost id='default-post-link'}}Default Post{{/link-to}}{{#if currentPost}}{{#link-to 'post' id='post-link'}}Post{{/link-to}}{{/if}}"));
setTemplate('application', compile("{{#link-to 'index' id='home-link'}}Home{{/link-to}}{{#link-to 'post' defaultPost id='default-post-link'}}Default Post{{/link-to}}{{#if currentPost}}{{#link-to 'post' currentPost id='current-post-link'}}Current Post{{/link-to}}{{/if}}"));

App.ApplicationController = Controller.extend({
defaultPost: { id: 1 },
postController: inject.controller('post'),
currentPost: alias('postController.model')
});

App.PostController = Controller.extend({
model: { id: 1 }
App.PostController = Controller.extend();

App.PostRoute = Route.extend({
model: function() {
return { id: 2 };
},
serialize: function(model) {
return { post_id: model.id };
}
});

Router.map(function() {
Expand All @@ -1273,6 +1281,8 @@ QUnit.test('the {{link-to}} helper does not throw an error if its route has exit

run(() => jQuery('#default-post-link', '#qunit-fixture').click());
run(() => jQuery('#home-link', '#qunit-fixture').click());
run(() => jQuery('#current-post-link', '#qunit-fixture').click());
run(() => jQuery('#home-link', '#qunit-fixture').click());
});

QUnit.test('{{link-to}} active property respects changing parent route context', function() {
Expand Down
4 changes: 4 additions & 0 deletions packages/ember/tests/routing/basic_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1850,6 +1850,10 @@ QUnit.test('Parent route context change', function() {
return { id: params.postId };
},

serialize(model) {
return { postId: model.id };
},

actions: {
editPost(context) {
this.transitionTo('post.edit');
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5124,9 +5124,9 @@ rollup@^0.34.11:
dependencies:
source-map-support "^0.4.0"

route-recognizer@^0.2.7:
version "0.2.7"
resolved "https://registry.yarnpkg.com/route-recognizer/-/route-recognizer-0.2.7.tgz#32360026d5be700be5a4fd834b64a6c611485952"
route-recognizer@^0.2.8:
version "0.2.8"
resolved "https://registry.yarnpkg.com/route-recognizer/-/route-recognizer-0.2.8.tgz#931e2629b09f351ac8e577aea03ad0151781e625"

rsvp@^3.0.14, rsvp@^3.0.16, rsvp@^3.0.17, rsvp@^3.0.18, rsvp@^3.0.21, rsvp@^3.0.6, rsvp@^3.1.0, rsvp@^3.2.1:
version "3.3.3"
Expand Down

0 comments on commit 431449b

Please sign in to comment.