Skip to content

Commit 7d86eac

Browse files
authored
test: Addition of paymentIcon Helpers Test (#4025)
1 parent 6af54b2 commit 7d86eac

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { module, test } from 'qunit';
2+
import { setupIntegrationTest } from 'open-event-frontend/tests/helpers/setup-integration-test';
3+
import hbs from 'htmlbars-inline-precompile';
4+
import { render } from '@ember/test-helpers';
5+
6+
module('Integration | Helper | payment-icon', function(hooks) {
7+
setupIntegrationTest(hooks);
8+
9+
test('it renders', async function(assert) {
10+
this.set('inputIcon', 'Visa');
11+
await render(hbs`{{payment-icon inputIcon}}`);
12+
assert.equal(this.element.textContent.trim(), 'big visa icon');
13+
14+
this.set('inputIcon', 'MasterCard');
15+
await render(hbs`{{payment-icon inputIcon}}`);
16+
assert.equal(this.element.textContent.trim(), 'big mastercard icon');
17+
18+
this.set('inputIcon', 'American Express');
19+
await render(hbs`{{payment-icon inputIcon}}`);
20+
assert.equal(this.element.textContent.trim(), 'big amex icon');
21+
22+
});
23+
});

0 commit comments

Comments
 (0)