-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Addition of paymentIcon Helpers Test (#4025)
- Loading branch information
1 parent
6af54b2
commit 7d86eac
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
|
||
}); | ||
}); |