Sha256: 411216bc3c55d8103afd0877aec849311bec618f5eb70de2e30ff10c29d488d9
Contents?: true
Size: 909 Bytes
Versions: 2
Compression:
Stored size: 909 Bytes
Contents
require 'test_helper' require 'pry' class ReserveTicketsTest < Minitest::Test def reserve_tickets Gillbus::ReserveTickets::Response.parse_string(File.read('test/responses/reserveTickets.xml')) end def test_number assert_equal('8472', reserve_tickets.tickets.first.ticket_number) end def test_total assert_equal(Money.new(110_00, 'UAH'), reserve_tickets.tickets.first.total_amount) end def test_date_to_pay assert_equal(DateTime.new(2013, 5, 22, 20, 30, 0, '+3'), reserve_tickets.tickets.first.date_to_pay) end def test_date_to_pay_with_timezone tickets = Gillbus::ReserveTickets::Response.parse_string( File.read('test/responses/reserveTickets.xml'), timezone: 'Europe/Moscow', ) assert_equal(DateTime.new(2013, 5, 22, 20, 30, 0, '+4'), tickets.tickets.first.date_to_pay) assert_equal('MSK', tickets.tickets.first.date_to_pay.zone) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gillbus-0.16.9 | test/reserve_tickets_test.rb |
gillbus-0.16.8 | test/reserve_tickets_test.rb |