Sha256: b01aa6062135ed7d8a89da26c17b01ce226e01f30589fef1c8c571af8ccdc57f
Contents?: true
Size: 1.02 KB
Versions: 4
Compression:
Stored size: 1.02 KB
Contents
require 'zobbix' class ZobbixTest < Minitest::Test def zbx Zobbix.new(uri: ZABBIX_TEST_URI, user: ZABBIX_TEST_USER, password: ZABBIX_TEST_PASSWORD) end def test_low_version VCR.use_cassette('check_version/low_version') do assert_raises(Zobbix::UnsupportedVersionError) { zbx.check_version! } end end def test_high_version VCR.use_cassette('check_version/high_version') do assert_raises(Zobbix::UnsupportedVersionError) { zbx.check_version! } end end def test_ok_version VCR.use_cassette('check_version/ok_version') do zbx.check_version! pass end end def test_ok_authenticate VCR.use_cassette('authentication') do zbx.authenticate! pass end end def test_bad_authenticate VCR.use_cassette('bad_authentication') do client = Zobbix.new(uri: ZABBIX_TEST_URI, user: ZABBIX_TEST_USER, password: 'shit') assert_raises(Zobbix::AuthenticationError) do client.authenticate! end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
zobbix-0.0.4 | test/zobbix_test.rb |
zobbix-0.0.3 | test/zobbix_test.rb |
zobbix-0.0.2 | test/zobbix_test.rb |
zobbix-0.0.1 | test/zobbix_test.rb |