Skip to content

Commit

Permalink
Merge pull request #15951 from boyanyordanov/service-test-rfc232
Browse files Browse the repository at this point in the history
blueprints/service-test: Added RFC-232 variant
  • Loading branch information
rwjblue authored Dec 9, 2017
2 parents 5b61b7e + 2223cef commit 46a964c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';

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

// Replace this with your real tests.
test('it exists', function(assert) {
let service = this.owner.lookup('service:<%= dasherizedModuleName %>');
assert.ok(service);
});
});

13 changes: 13 additions & 0 deletions node-tests/blueprints/service-test-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@ describe('Blueprint: service-test', function() {
});
});
});

describe('with ember-cli-qunit@4.1.1', function() {
beforeEach(function() {
generateFakePackageManifest('ember-cli-qunit', '4.1.1');
});

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

describe('in addon', function() {
Expand Down
13 changes: 13 additions & 0 deletions node-tests/fixtures/service-test/rfc232.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';

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

// Replace this with your real tests.
test('it exists', function(assert) {
let service = this.owner.lookup('service:foo');
assert.ok(service);
});
});

0 comments on commit 46a964c

Please sign in to comment.