Skip to content

Commit

Permalink
Replaces integration tests with unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xcambar authored and mathieupoteriepeopledoc committed Sep 6, 2018
1 parent 009c3c0 commit f9be194
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 35 deletions.
2 changes: 1 addition & 1 deletion addon/utils/bind-data-test-attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function bindDataTestAttributes(component) {
let message = `ember-test-selectors could not bind data-test-* properties on ${component} ` +
`automatically because tagName is empty.`;

assert(message, tagName!== '', {
assert(message, tagName !== '', {
id: 'ember-test-selectors.empty-tag-name',
});

Expand Down
34 changes: 0 additions & 34 deletions tests/integration/bind-data-test-attributes-test.js

This file was deleted.

12 changes: 12 additions & 0 deletions tests/unit/utils/bind-data-test-attributes-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,15 @@ test('it skips if attributeBindings is a computed property', function(assert) {

assert.deepEqual(instance.get('attributeBindings'), ['foo']);
});

test('it breaks if tagName is empty', function(assert) {
let Fixture = EmberObject.extend({
tagName: '',
'data-test-from-factory': 'foo',
});
let instance = Fixture.create({
'data-test-from-invocation': 'bar',
});

assert.throws(() => bindDataTestAttributes(instance));
});

0 comments on commit f9be194

Please sign in to comment.