Reload data before checking

This commit is contained in:
Henne Vogelsang 2025-04-10 16:21:17 +02:00
parent f85e9cdd00
commit ccf490bad4
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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