2018-09-25 16:28:26 +00:00
|
|
|
import { module, test } from 'qunit';
|
|
|
|
import { setupRenderingTest } from 'ember-qunit';
|
|
|
|
import { render, find } from '@ember/test-helpers';
|
2018-04-03 14:16:57 +00:00
|
|
|
import hbs from 'htmlbars-inline-precompile';
|
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
module('Integration | Component | edition badge', function(hooks) {
|
|
|
|
setupRenderingTest(hooks);
|
2018-04-03 14:16:57 +00:00
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
test('it renders', async function(assert) {
|
|
|
|
await render(hbs`
|
|
|
|
{{edition-badge edition="Custom"}}
|
|
|
|
`);
|
2018-04-03 14:16:57 +00:00
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
assert.equal(find('.edition-badge').textContent.trim(), 'Custom', 'contains edition');
|
2018-04-03 14:16:57 +00:00
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
await render(hbs`
|
|
|
|
{{edition-badge edition="Enterprise"}}
|
|
|
|
`);
|
2018-04-03 14:16:57 +00:00
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
assert.equal(find('.edition-badge').textContent.trim(), 'Enterprise', 'renders edition');
|
|
|
|
});
|
2018-04-03 14:16:57 +00:00
|
|
|
});
|