remove 'paid' argument in testing function calls
This commit is contained in:
parent
888c7a8524
commit
07c9aee7cc
1 changed files with 7 additions and 7 deletions
|
|
@ -108,11 +108,11 @@ describe Ticket do
|
||||||
user: user,
|
user: user,
|
||||||
ticket: ticket,
|
ticket: ticket,
|
||||||
quantity: 20)
|
quantity: 20)
|
||||||
expect(ticket.quantity_bought_by(user, paid: false)).to eq(20)
|
expect(ticket.quantity_bought_by(user)).to eq(20)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns zero if the user has not bought this ticket' do
|
it 'returns zero if the user has not bought this ticket' do
|
||||||
expect(ticket.quantity_bought_by(user, paid: false)).to eq(0)
|
expect(ticket.quantity_bought_by(user)).to eq(0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -122,11 +122,11 @@ describe Ticket do
|
||||||
user: user,
|
user: user,
|
||||||
ticket: ticket,
|
ticket: ticket,
|
||||||
quantity: 20)
|
quantity: 20)
|
||||||
expect(ticket.total_price(user, paid: false)).to eq(Money.new(100000, 'USD'))
|
expect(ticket.total_price(user)).to eq(Money.new(100000, 'USD'))
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns zero if the user has not bought this ticket' do
|
it 'returns zero if the user has not bought this ticket' do
|
||||||
expect(ticket.total_price(user, paid: false)).to eq(Money.new(0, 'USD'))
|
expect(ticket.total_price(user)).to eq(Money.new(0, 'USD'))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -136,7 +136,7 @@ describe Ticket do
|
||||||
describe 'user has bought' do
|
describe 'user has bought' do
|
||||||
context 'no tickets' do
|
context 'no tickets' do
|
||||||
it 'returns zero' do
|
it 'returns zero' do
|
||||||
expect(Ticket.total_price(conference, user, paid: false)).to eq(Money.new(0, 'USD'))
|
expect(Ticket.total_price(conference, user)).to eq(Money.new(0, 'USD'))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -146,7 +146,7 @@ describe Ticket do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns the correct total price' do
|
it 'returns the correct total price' do
|
||||||
expect(Ticket.total_price(conference, user, paid: false)).to eq(Money.new(100000, 'USD'))
|
expect(Ticket.total_price(conference, user)).to eq(Money.new(100000, 'USD'))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -158,7 +158,7 @@ describe Ticket do
|
||||||
|
|
||||||
it 'returns the correct total price' do
|
it 'returns the correct total price' do
|
||||||
total_price = Money.new(200000, 'USD')
|
total_price = Money.new(200000, 'USD')
|
||||||
expect(Ticket.total_price(conference, user, paid: false)).to eq(total_price)
|
expect(Ticket.total_price(conference, user)).to eq(total_price)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue