Skip to content

Commit

Permalink
Merge pull request #49 from begedin/master
Browse files Browse the repository at this point in the history
Fix issue with integration tests for components using title helper
  • Loading branch information
tim-evans authored Dec 29, 2016
2 parents 798534c + 86a30ad commit 68698c7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addon/helpers/page-title.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default Ember.Helper.extend({
let id = guidFor(this);
tokens.remove(id);

let activeTransition = getOwner(this).lookup('router:main').router.activeTransition;
let activeTransition = getOwner(this).lookup('router:main').get('router.activeTransition');
let headData = get(this, 'headData');
if (activeTransition) {
activeTransition.promise.finally(function () {
Expand Down
4 changes: 4 additions & 0 deletions tests/dummy/app/components/title-user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Ember from 'ember';

export default Ember.Component.extend({
});
1 change: 1 addition & 0 deletions tests/dummy/app/templates/components/title-user.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{title "Foo"}}
11 changes: 11 additions & 0 deletions tests/integration/components/title-user-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';

moduleForComponent('title-user', 'Integration | Component | title user', {
integration: true
});

test('it renders without causing failures down the line', function(assert) {
this.render(hbs`{{title-user}}`);
assert.equal(this.$().text().trim(), '');
});

0 comments on commit 68698c7

Please sign in to comment.