meilisearch-admin/tests/integration/helpers/eq-test.js

25 lines
708 B
JavaScript
Raw Permalink Normal View History

2022-09-02 12:01:26 +00:00
import { module, test } from 'qunit';
import { setupRenderingTest } from 'meiliadmin/tests/helpers';
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
module('Integration | Helper | eq', function (hooks) {
setupRenderingTest(hooks);
// TODO: Replace this with your real tests.
test('it renders', async function (assert) {
2022-09-18 14:18:04 +00:00
this.set('inputValue1', '1');
this.set('inputValue2', '1');
2022-09-02 12:01:26 +00:00
2022-09-18 14:18:04 +00:00
await render(hbs`{{eq this.inputValue1 this.inputValue2}}`);
2022-09-02 12:01:26 +00:00
2022-09-18 14:18:04 +00:00
assert.dom(this.element).hasText('true');
this.set('inputValue2', '2');
await render(hbs`{{eq this.inputValue1 this.inputValue2}}`);
assert.dom(this.element).hasText('false');
2022-09-02 12:01:26 +00:00
});
});