Modify conference registration to a singular resource
This commit is contained in:
parent
8b831b1977
commit
0675572e05
17 changed files with 37 additions and 37 deletions
|
|
@ -19,10 +19,10 @@ feature Registration do
|
|||
scenario 'updates conference registration', feature: true, js: true do
|
||||
visit root_path
|
||||
click_link 'My Registration'
|
||||
expect(current_path).to eq(conference_conference_registrations_path(conference.short_title))
|
||||
expect(current_path).to eq(conference_conference_registration_path(conference.short_title))
|
||||
|
||||
click_link 'Edit your Registration'
|
||||
expect(current_path).to eq(edit_conference_conference_registrations_path(conference.short_title))
|
||||
expect(current_path).to eq(edit_conference_conference_registration_path(conference.short_title))
|
||||
|
||||
click_button 'Update Registration'
|
||||
expect(conference.user_registered?(participant)).to be(true)
|
||||
|
|
@ -31,7 +31,7 @@ feature Registration do
|
|||
scenario 'unregisters for a conference', feature: true, js: true do
|
||||
visit root_path
|
||||
click_link 'My Registration'
|
||||
expect(current_path).to eq(conference_conference_registrations_path(conference.short_title))
|
||||
expect(current_path).to eq(conference_conference_registration_path(conference.short_title))
|
||||
|
||||
click_link 'Unregister'
|
||||
expect(conference.user_registered?(participant)).to be(false)
|
||||
|
|
@ -43,7 +43,7 @@ feature Registration do
|
|||
visit root_path
|
||||
click_link 'Register'
|
||||
|
||||
expect(current_path).to eq(new_conference_conference_registrations_path(conference.short_title))
|
||||
expect(current_path).to eq(new_conference_conference_registration_path(conference.short_title))
|
||||
click_button 'Register'
|
||||
|
||||
expect(conference.user_registered?(participant)).to be(true)
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ feature Event do
|
|||
click_link "confirm_proposal_#{@event.id}"
|
||||
expect(flash).
|
||||
to eq('The proposal was confirmed. Please register to attend the conference.')
|
||||
expect(current_path).to eq(new_conference_conference_registrations_path(conference.short_title))
|
||||
expect(current_path).to eq(new_conference_conference_registration_path(conference.short_title))
|
||||
@event.reload
|
||||
expect(@event.state).to eq('confirmed')
|
||||
end
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ feature Registration do
|
|||
visit root_path
|
||||
click_link 'Register'
|
||||
|
||||
expect(current_path).to eq(new_conference_conference_registrations_path(conference.short_title))
|
||||
expect(current_path).to eq(new_conference_conference_registration_path(conference.short_title))
|
||||
click_button 'Register'
|
||||
|
||||
fill_in "tickets__#{ticket.id}", with: '2'
|
||||
|
|
@ -30,7 +30,7 @@ feature Registration do
|
|||
|
||||
purchase = TicketPurchase.where(user_id: participant.id, ticket_id: ticket.id).first
|
||||
expect(purchase.quantity).to eq(2)
|
||||
expect(current_path).to eq(conference_conference_registrations_path(conference.short_title))
|
||||
expect(current_path).to eq(conference_conference_registration_path(conference.short_title))
|
||||
expect(flash).
|
||||
to eq("Thank you for supporting #{conference.title} by purchasing a ticket.")
|
||||
expect(page.has_content?("2 #{ticket.title} Tickets for 10")).to be true
|
||||
|
|
@ -40,7 +40,7 @@ feature Registration do
|
|||
create(:registration, conference: conference, user: participant)
|
||||
create(:ticket_purchase, conference: conference, user: participant, ticket: ticket, quantity: 4)
|
||||
|
||||
visit conference_conference_registrations_path(conference.short_title)
|
||||
visit conference_conference_registration_path(conference.short_title)
|
||||
expect(page.has_content?("4 #{ticket.title} Tickets for 10")).to be true
|
||||
|
||||
click_link "ticket-#{ticket.id}-delete"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue