From 4d4736f0429b9d907982bab47394946f9523723a Mon Sep 17 00:00:00 2001 From: Rishabh Saxena Date: Fri, 22 Jul 2016 01:15:22 +0530 Subject: [PATCH] repair tests --- app/views/payments/_payment.html.haml | 2 +- spec/features/payments_spec.rb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/payments/_payment.html.haml b/app/views/payments/_payment.html.haml index 7f429189..db508369 100644 --- a/app/views/payments/_payment.html.haml +++ b/app/views/payments/_payment.html.haml @@ -21,5 +21,5 @@ = f.text_field :card_verification_value, class: "form-control", placeholder: "XXX", id: "card_verification_value" = f.number_field :amount, value: @total_amount_to_pay, class: "form-control", type: 'hidden' .form-group.text-center - = f.submit "Pay #{number_to_currency @total_amount_to_pay, unit: @total_amount_to_pay.symbol}", class: "btn btn-primary" + = f.submit "Pay #{number_to_currency @total_amount_to_pay, unit: @total_amount_to_pay.symbol}", class: "btn btn-primary", id: "Charge Card" = link_to "Cancel", conference_conference_registration_path, class: "btn btn-danger" diff --git a/spec/features/payments_spec.rb b/spec/features/payments_spec.rb index 26278dba..d9ef69dd 100644 --- a/spec/features/payments_spec.rb +++ b/spec/features/payments_spec.rb @@ -41,6 +41,7 @@ feature Registration do click_button 'Charge Card' expect(Payment.count).to eq(0) + expect(current_path).to eq(conference_conference_registration_path(conference.short_title)) end scenario 'purchases and pays for a ticket, with card producing a transaction failure', feature: true, js: true do @@ -68,6 +69,7 @@ feature Registration do click_button 'Charge Card' expect(Payment.count).to eq(0) + expect(current_path).to eq(conference_conference_registration_path(conference.short_title)) end scenario 'purchases and pays for a ticket successfully', feature: true, js: true do