Allow updating currency of ticket if its the only ticket

This commit is contained in:
Nishanth Vijayan 2016-05-28 20:57:25 +05:30
parent efda31870b
commit 69f4771ec6
2 changed files with 6 additions and 0 deletions

View file

@ -45,6 +45,11 @@ describe Ticket do
end
end
it 'allows updating currency of ticket if its the only ticket of the conference' do
ticket.price_currency = 'INR'
expect(ticket).to be_valid
end
describe 'association' do
it { should belong_to(:conference) }
it { should have_many(:ticket_purchases).dependent(:destroy) }