automatically create free ticket with new conf
This commit is contained in:
parent
a6f7516eae
commit
53291e25b5
2 changed files with 20 additions and 0 deletions
|
|
@ -1583,4 +1583,14 @@ describe Conference do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'after_create' do
|
||||
let!(:conference) { create(:conference) }
|
||||
|
||||
it 'creates free tickets' do
|
||||
free_ticket = Ticket.find_by(conference: conference)
|
||||
expect(free_ticket).not_to be_nil
|
||||
expect(free_ticket.price_cents).to eq(0)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue