add tests and repair button click
This commit is contained in:
parent
99b4d18729
commit
58a240a9f2
1 changed files with 8 additions and 1 deletions
|
|
@ -39,8 +39,15 @@ feature Registration do
|
||||||
fill_in 'card_verification_value', with: '123'
|
fill_in 'card_verification_value', with: '123'
|
||||||
fill_in 'credit_card_number', with: '4242424242424242'
|
fill_in 'credit_card_number', with: '4242424242424242'
|
||||||
|
|
||||||
click_button 'charge_card'
|
click_button 'Charge Card'
|
||||||
|
|
||||||
|
payment = Payment.where(user_id: participant.id, conference_id: conference.id).first
|
||||||
|
expect(payment.amount).to eq(20)
|
||||||
|
expect(payment.status).to eq(1)
|
||||||
|
expect(payment.first_name).to eq('foo')
|
||||||
|
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(current_path).to eq(conference_conference_registrations_path(conference.short_title))
|
||||||
expect(flash).
|
expect(flash).
|
||||||
to eq('Thanks! You have purchased your tickets successfully.')
|
to eq('Thanks! You have purchased your tickets successfully.')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue