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.4.7 test/test_timezone_validator.rb
embulk-input-mixpanel-0.4.6 test/test_timezone_validator.rb
embulk-input-mixpanel-0.4.5 test/test_timezone_validator.rb
embulk-input-mixpanel-0.4.4 test/test_timezone_validator.rb
embulk-input-mixpanel-0.4.3 test/test_timezone_validator.rb
embulk-input-mixpanel-0.4.2 test/test_timezone_validator.rb
embulk-input-mixpanel-0.4.1 test/test_timezone_validator.rb
embulk-input-mixpanel-0.4.0 test/test_timezone_validator.rb
embulk-input-mixpanel-0.3.4 test/test_timezone_validator.rb
embulk-input-mixpanel-0.3.3 test/test_timezone_validator.rb