spec/integration/estimates_spec.rb in patch_ruby-1.3.0 vs spec/integration/estimates_spec.rb in patch_ruby-1.4.0

- old
+ new

@@ -31,23 +31,35 @@ distance_m: distance_m, create_order: false ) expect(flight_estimate.data.type).to eq 'flight' - expect(flight_estimate.data.mass_g).to eq 1_032_000 + expect(flight_estimate.data.mass_g).to eq 1_031_697 end it 'supports creating vehicle estimates' do distance_m = 10_000 make = "Toyota" - model = "Prius" + model = "Corolla" year = 2000 vehicle_estimate = Patch::Estimate.create_vehicle_estimate( distance_m: distance_m, make: make, model: model, year: year, + create_order: false + ) + + expect(vehicle_estimate.data.type).to eq 'vehicle' + expect(vehicle_estimate.data.mass_g).to eq 5_500 + end + + it 'supports creating vehicle estimates with partial information' do + distance_m = 10_000 + + vehicle_estimate = Patch::Estimate.create_vehicle_estimate( + distance_m: distance_m, create_order: false ) expect(vehicle_estimate.data.type).to eq 'vehicle' expect(vehicle_estimate.data.mass_g).to eq 2_132