Skip to content

Commit

Permalink
Rename VehicleTelemetry to Telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-ioki committed May 7, 2024
1 parent 0906187 commit a8b42e0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Expand Up @@ -3,7 +3,7 @@
module Ioki
module Model
module Operator
class VehicleTelemetry < Base
class Telemetry < Base
attribute :id,
on: :read,
type: :string
Expand Down
4 changes: 2 additions & 2 deletions lib/ioki/model/operator/vehicle.rb
Expand Up @@ -126,10 +126,10 @@ class Vehicle < Base
omit_if_nil_on: [:create, :update],
type: :integer

attribute :vehicle_telemetry,
attribute :telemetry,
on: :read,
type: :object,
class_name: 'VehicleTelemetry'
class_name: 'Telemetry'

attribute :version,
on: [:update, :read],
Expand Down
@@ -1,6 +1,6 @@
# frozen_string_literal: true

RSpec.describe Ioki::Model::Operator::VehicleTelemetry do
RSpec.describe Ioki::Model::Operator::Telemetry do
it { is_expected.to define_attribute(:id).as(:string) }
it { is_expected.to define_attribute(:battery_level).as(:float) }
it { is_expected.to define_attribute(:remaining_distance).as(:float) }
Expand Down
2 changes: 1 addition & 1 deletion spec/ioki/model/operator/vehicle_spec.rb
Expand Up @@ -33,5 +33,5 @@
it { is_expected.to define_attribute(:storage_spaces).as(:integer) }
it { is_expected.to define_attribute(:walker_bays).as(:integer) }
it { is_expected.to define_attribute(:wheelchair_bays).as(:integer) }
it { is_expected.to define_attribute(:vehicle_telemetry).as(:object).with(class_name: 'VehicleTelemetry') }
it { is_expected.to define_attribute(:telemetry).as(:object).with(class_name: 'Telemetry') }
end

0 comments on commit a8b42e0

Please sign in to comment.