spec/tickets: add tests for free ticket creation

This commit is contained in:
Rishabh Saxena 2016-08-18 23:22:46 +05:30
parent 4dcfc55418
commit b2f75dd907
No known key found for this signature in database
GPG key ID: FA3BDC38A9CB6807
2 changed files with 6 additions and 6 deletions

View file

@ -22,14 +22,14 @@ describe Ticket do
should validate_presence_of(:price_currency)
end
it 'is not valid with a price_cents equals zero' do
should_not allow_value(0).for(:price_cents)
end
it 'is not valid with a price_cents smaller than zero' do
should_not allow_value(-1).for(:price_cents)
end
it 'is valid with a price_cents equals zero' do
should allow_value(0).for(:price_cents)
end
it 'is valid with a price_cents greater than zero' do
should allow_value(1).for(:price_cents)
end