Sha256: cad5a28d8466f1454bba57ad6b944886792e76a5280c5a29bac4df2058e89512

Contents?: true

Size: 807 Bytes

Versions: 46

Compression:

Stored size: 807 Bytes

Contents

require 'test_helper'

class ReturnPositionTest < Minitest::Test
  def test_request
    request = Gillbus::ReturnPosition::Request.new(
      ticket_count: 1,
      system_numbers: [123456],
    )

    assert_equal(
      {
        ticketCount: 1,
        systemNumber0: 123456,
      },
      request.params,
    )
  end

  def test_success_response
    assert success_response.return_positions.first.confirmation
  end

  def test_failure_response
    refute failure_response.return_positions.first.confirmation
  end

  private

  def success_response
    Gillbus::ReturnPosition::Response.parse_string(File.read('test/responses/returnPositionSuccess.xml'))
  end

  def failure_response
    Gillbus::ReturnPosition::Response.parse_string(File.read('test/responses/returnPositionFailure.xml'))
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
gillbus-0.20.1 test/return_position_test.rb
gillbus-0.20.0 test/return_position_test.rb
gillbus-0.19.0 test/return_position_test.rb
gillbus-0.18.14 test/return_position_test.rb
gillbus-0.18.13 test/return_position_test.rb
gillbus-0.18.12 test/return_position_test.rb
gillbus-0.18.11 test/return_position_test.rb
gillbus-0.18.10 test/return_position_test.rb
gillbus-0.18.9 test/return_position_test.rb
gillbus-0.18.8 test/return_position_test.rb
gillbus-0.18.7 test/return_position_test.rb
gillbus-0.18.6 test/return_position_test.rb
gillbus-0.18.5 test/return_position_test.rb
gillbus-0.18.4 test/return_position_test.rb
gillbus-0.18.3 test/return_position_test.rb
gillbus-0.18.2 test/return_position_test.rb
gillbus-0.18.1 test/return_position_test.rb
gillbus-0.17.6 test/return_position_test.rb
gillbus-0.17.5 test/return_position_test.rb
gillbus-0.17.4 test/return_position_test.rb