Skip to content

Commit

Permalink
Merge pull request #15957 from rwwagner90/route-test
Browse files Browse the repository at this point in the history
RFC 232 route-test blueprints
  • Loading branch information
rwjblue authored Dec 8, 2017
2 parents e1dc61f + 060e6a6 commit 5e8b75c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';

module('<%= friendlyTestDescription %>', function(hooks) {
setupTest(hooks);

test('it exists', function(assert) {
let route = this.owner.lookup('route:<%= moduleName %>');
assert.ok(route);
});
});
13 changes: 13 additions & 0 deletions node-tests/blueprints/route-test-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ describe('Blueprint: route-test', function() {
});
});

describe('with [email protected]', function() {
beforeEach(function() {
generateFakePackageManifest('ember-cli-qunit', '4.1.1');
});

it('route-test foo', function() {
return emberGenerateDestroy(['route-test', 'foo'], (_file) => {
expect(_file('tests/unit/routes/foo-test.js'))
.to.equal(fixture('route-test/rfc232.js'));
});
});
});

describe('with [email protected]', function() {
beforeEach(function() {
modifyPackages([
Expand Down
11 changes: 11 additions & 0 deletions node-tests/fixtures/route-test/rfc232.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';

module('Unit | Route | foo', function(hooks) {
setupTest(hooks);

test('it exists', function(assert) {
let route = this.owner.lookup('route:foo');
assert.ok(route);
});
});

0 comments on commit 5e8b75c

Please sign in to comment.