File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
tests/integration/helpers Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
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
+ } ) ;
You can’t perform that action at this time.
0 commit comments