Skip to content

Commit

Permalink
test: Addition of paymentIcon Helpers Test (#4025)
Browse files Browse the repository at this point in the history
  • Loading branch information
kushthedude authored Feb 7, 2020
1 parent 6af54b2 commit 7d86eac
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/integration/helpers/payment-icon-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { module, test } from 'qunit';
import { setupIntegrationTest } from 'open-event-frontend/tests/helpers/setup-integration-test';
import hbs from 'htmlbars-inline-precompile';
import { render } from '@ember/test-helpers';

module('Integration | Helper | payment-icon', function(hooks) {
setupIntegrationTest(hooks);

test('it renders', async function(assert) {
this.set('inputIcon', 'Visa');
await render(hbs`{{payment-icon inputIcon}}`);
assert.equal(this.element.textContent.trim(), 'big visa icon');

this.set('inputIcon', 'MasterCard');
await render(hbs`{{payment-icon inputIcon}}`);
assert.equal(this.element.textContent.trim(), 'big mastercard icon');

this.set('inputIcon', 'American Express');
await render(hbs`{{payment-icon inputIcon}}`);
assert.equal(this.element.textContent.trim(), 'big amex icon');

});
});

0 comments on commit 7d86eac

Please sign in to comment.