From 7d86eac9eb40fa529fc0d3749e540999206ff80f Mon Sep 17 00:00:00 2001 From: Kush Trivedi <44091822+kushthedude@users.noreply.github.com> Date: Fri, 7 Feb 2020 19:29:06 +0530 Subject: [PATCH] test: Addition of paymentIcon Helpers Test (#4025) --- .../integration/helpers/payment-icon-test.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/integration/helpers/payment-icon-test.js diff --git a/tests/integration/helpers/payment-icon-test.js b/tests/integration/helpers/payment-icon-test.js new file mode 100644 index 00000000000..14c5ecedc1d --- /dev/null +++ b/tests/integration/helpers/payment-icon-test.js @@ -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'); + + }); +});