diff --git a/app/views/payments/_payment.html.haml b/app/views/payments/_payment.html.haml index da08a240..33e88886 100644 --- a/app/views/payments/_payment.html.haml +++ b/app/views/payments/_payment.html.haml @@ -30,5 +30,5 @@ %a = number_to_currency @total_amount_to_pay .form-group - = f.submit "Charge Card", class: "btn btn-primary", id: "charge_card" + = f.submit "Charge Card", class: "btn btn-primary" = link_to "Cancel", conference_conference_registrations_path, class: "btn btn-danger" diff --git a/spec/features/ticket_purchases_spec.rb b/spec/features/ticket_purchases_spec.rb index 2d40d287..320f05f0 100644 --- a/spec/features/ticket_purchases_spec.rb +++ b/spec/features/ticket_purchases_spec.rb @@ -38,8 +38,7 @@ feature Registration do select Date.current.year + 2, from: 'expiration_year' fill_in 'card_verification_value', with: '123' fill_in 'credit_card_number', with: '4242424242424242' - - click_button 'Charge Card' + submit_form expect(current_path).to eq(conference_conference_registrations_path(conference.short_title)) payment = Payment.where(user_id: participant.id, conference_id: conference.id).first