From 973dfce05d883d7d7d16586d3b3f04a5363c1c03 Mon Sep 17 00:00:00 2001 From: Scott Batson Date: Sun, 13 Nov 2016 13:20:05 -0500 Subject: [PATCH] update credit-card integration test --- tests/integration/components/donation/credit-card-test.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/integration/components/donation/credit-card-test.js b/tests/integration/components/donation/credit-card-test.js index 28330b7aa..872e0f571 100644 --- a/tests/integration/components/donation/credit-card-test.js +++ b/tests/integration/components/donation/credit-card-test.js @@ -4,6 +4,9 @@ import PageObject from 'ember-cli-page-object'; import stubService from 'code-corps-ember/tests/helpers/stub-service'; import setHandler from 'code-corps-ember/tests/helpers/set-handler'; import creditCardComponent from '../../../pages/components/donation/credit-card'; +import Ember from 'ember'; + +const { RSVP: { Promise }} = Ember; let page = PageObject.create(creditCardComponent); @@ -19,7 +22,7 @@ moduleForComponent('donation/credit-card', 'Integration | Component | donation/c }); test('it sends submit with credit card fields when button is clicked', function(assert) { - assert.expect(2); + assert.expect(1); this.set('canDonate', true); @@ -32,6 +35,7 @@ test('it sends submit with credit card fields when button is clicked', function( let submitHandler = function(actualProps) { assert.deepEqual(actualProps, expectedProps, 'Action was called with proper attributes.'); + return Promise.resolve(); }; setHandler(this, 'submit', submitHandler); @@ -50,6 +54,4 @@ test('it sends submit with credit card fields when button is clicked', function( .cardYear(expectedProps.year) .cardCVC(expectedProps.cvc) .clickSubmit(); - - assert.ok(page.submitDisabled, 'Submit button got disabled.'); });