Reload data before checking
This commit is contained in:
parent
f85e9cdd00
commit
ccf490bad4
2 changed files with 3 additions and 3 deletions
|
|
@ -52,7 +52,7 @@ feature Registration do
|
|||
expect(current_path).to eq(new_conference_conference_registration_path(conference.short_title))
|
||||
click_button 'Register'
|
||||
|
||||
expect(conference.user_registered?(participant)).to be(true)
|
||||
expect(conference.reload.user_registered?(participant)).to be(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ feature Ticket do
|
|||
# It's necessary to multiply by 100 because the price is in cents
|
||||
page.find('#flash')
|
||||
expect(flash).to eq('Ticket successfully updated.')
|
||||
expect(ticket.price).to eq(Money.new(50 * 100, 'USD'))
|
||||
expect(ticket.title).to eq('Event Ticket')
|
||||
expect(ticket.reload.price).to eq(Money.new(50 * 100, 'USD'))
|
||||
expect(ticket.reload.title).to eq('Event Ticket')
|
||||
expect(Ticket.count).to eq(2)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue