Sha256: da9577fc393ac33eb00baf88ce16a7cb1aedeaf52a7a2974e4d603d6e7f0083a

Contents?: true

Size: 1.01 KB

Versions: 13

Compression:

Stored size: 1.01 KB

Contents

# frozen_string_literal: true

require 'spec_helper'
require 'quick_travel/client'

describe QuickTravel::Client do
  context '#find' do
    let(:templates) do
      VCR.use_cassette('client_templates') do
        QuickTravel::Client.find(2).templates
      end
    end
    it 'should find the templates correctly' do
      expect(templates['vehicle_templates']).to eq([
        {
          'id' => 1,
          'length' => 5.0,
          'height' => 1.5,
          'width' => 1.8,
          'weight' => 1000.0,
          'details' => 'Holden Commodore',
          'registration' => 'ABC123',
          'cargo' => 'None',
          'vehicle_type_id' => 1,
          'party_id' => 9
        }
      ])
      expect(templates['passenger_templates']).to eq([
        {
          'id' => 1,
          'age' => 30,
          'title' => 'Mr',
          'first_name' => 'Homer',
          'last_name' => 'Simpson',
          'gender' => 'Male',
          'passenger_type_id' => 1,
          'party_id' => 9
        }
      ])
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
quicktravel_client-4.7.0 spec/clients_spec.rb
quicktravel_client-4.6.0 spec/clients_spec.rb
quicktravel_client-4.5.0 spec/clients_spec.rb
quicktravel_client-4.4.0 spec/clients_spec.rb
quicktravel_client-4.3.2 spec/clients_spec.rb
quicktravel_client-4.3.1 spec/clients_spec.rb
quicktravel_client-4.3.0 spec/clients_spec.rb
quicktravel_client-4.2.0 spec/clients_spec.rb
quicktravel_client-4.1.0 spec/clients_spec.rb
quicktravel_client-4.0.0 spec/clients_spec.rb
quicktravel_client-3.9.0 spec/clients_spec.rb
quicktravel_client-3.8.1 spec/clients_spec.rb
quicktravel_client-3.8.0 spec/clients_spec.rb