Skip to content

Commit

Permalink
Fix version being required on create for rides
Browse files Browse the repository at this point in the history
This was accidentally introduced in #54 and prevented us from creating
rides, since they don't have a version then as they are just about to be
created.
  • Loading branch information
rmehner committed Jan 6, 2022
1 parent bed7a7c commit fb1810a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion lib/ioki/model/passenger/ride.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class Ride < Base
attribute :destination, type: :object, on: [:create, :read], class_name: 'RequestedPoint'
attribute :passengers, type: :array, on: [:create, :read], class_name: 'RidePassenger'
attribute :user, type: :object, on: :read, class_name: 'User'
attribute :version, type: :integer, on: [:read, :create, :update]
attribute :booking, type: :object, on: :read, class_name: 'Booking'
attribute :pickup, type: :object, on: :read, class_name: 'CalculatedPoint'
attribute :dropoff, type: :object, on: :read, class_name: 'CalculatedPoint'
Expand Down
1 change: 1 addition & 0 deletions spec/ioki/passenger_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
it 'calls request on the client with expected params' do
expect(passenger_client).to receive(:request) do |params|
expect(params[:url].to_s).to eq('passenger/rides')
expect(params[:body][:data]).to_not have_key(:version)
[result_with_data, full_response]
end

Expand Down

0 comments on commit fb1810a

Please sign in to comment.