Sha256: f0148362ade923a6e3fbfbd9528e8969fe5ce8a905fbc19d0f4280046a290f96

Contents?: true

Size: 542 Bytes

Versions: 30

Compression:

Stored size: 542 Bytes

Contents

require "timezone_validator"
require "override_assert_raise"

class TimezoneValidatorTest < Test::Unit::TestCase
  include OverrideAssertRaise

  def test_valid
    valid_timezone = "Asia/Tokyo"

    assert_nothing_raised do
      TimezoneValidator.new(valid_timezone).validate
    end
  end

  def test_invalid
    invalid_timezone = "Asia/Tokyoooooooooooooo"

    mock(Embulk.logger).error(/#{Regexp.new(invalid_timezone)}/)

    assert_raise(Embulk::ConfigError) do
      TimezoneValidator.new(invalid_timezone).validate
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
embulk-input-mixpanel-0.6.1 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.15 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.14 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.13 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.12 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.12.alpha.1 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.11 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.11.alpha test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.10 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.9 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.8 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.7 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.6 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.5 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.4 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.3 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.3.alpha.1 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.2 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.1 test/test_timezone_validator.rb
embulk-input-mixpanel-0.5.0 test/test_timezone_validator.rb