spec/booking_spec.rb in quicktravel_client-2.3.1 vs spec/booking_spec.rb in quicktravel_client-2.4.0

- old
+ new

@@ -59,9 +59,20 @@ expect(b.reservations).to be_an_instance_of Array expect(b.reservations.size).to eq 0 end end + it 'should be able to return its payments and payment types' do + VCR.use_cassette('booking_show') do + b = QuickTravel::Booking.find(@booking.id) + expect(b.payment_types).to be_an_instance_of Array + expect(b.payment_types.size).to eq 3 + expect(b.payment_types.first).to be_an_instance_of QuickTravel::PaymentType + expect(b.payments).to be_an_instance_of Array + expect(b.payments.size).to eq 0 + end + end + it 'should be able to update the booking' do VCR.use_cassette('booking_update') do response = @booking.update(customer_contact_name: 'John') expect(response.class).to eq QuickTravel::Booking end