From 2e66e5807aca89fa4bb6ae0621e9ad4374b40b70 Mon Sep 17 00:00:00 2001 From: Rishabh Saxena Date: Fri, 8 Jul 2016 00:48:31 +0530 Subject: [PATCH] check path transition after payment --- spec/features/ticket_purchases_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/features/ticket_purchases_spec.rb b/spec/features/ticket_purchases_spec.rb index 19c1a735..2d40d287 100644 --- a/spec/features/ticket_purchases_spec.rb +++ b/spec/features/ticket_purchases_spec.rb @@ -41,6 +41,7 @@ feature Registration do click_button 'Charge Card' + expect(current_path).to eq(conference_conference_registrations_path(conference.short_title)) payment = Payment.where(user_id: participant.id, conference_id: conference.id).first expect(payment.amount).to eq(20) expect(payment.status).to eq(1) @@ -48,7 +49,6 @@ feature Registration do expect(payment.first_name).to eq('bar') expect(payment.last4).not_to be_empty expect(payment.authorization_code).not_to be_empty - expect(current_path).to eq(conference_conference_registrations_path(conference.short_title)) expect(flash). to eq('Thanks! You have purchased your tickets successfully.')