Add total amount spent by user
User can see the total amount that he paid for the tickets and total amount spent by him on each ticket
This commit is contained in:
parent
b761e83b45
commit
0d70832f5b
4 changed files with 10 additions and 4 deletions
|
|
@ -252,7 +252,7 @@ describe ConferenceRegistrationsController, type: :controller do
|
|||
end
|
||||
|
||||
it 'does not assign price of purchased tickets to total_price and purchased tickets to tickets without payment' do
|
||||
expect(assigns(:total_price)).to eq Money.new(0, 'USD')
|
||||
expect(assigns(:total_price)).to eq 0
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -262,7 +262,7 @@ describe ConferenceRegistrationsController, type: :controller do
|
|||
end
|
||||
|
||||
it 'assigns 0 dollars to total_price and empty array to tickets variables' do
|
||||
expect(assigns(:total_price)).to eq Money.new(0, 'USD')
|
||||
expect(assigns(:total_price)).to eq 0
|
||||
expect(assigns(:tickets)).to match_array []
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue