mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-15 23:00:48 +00:00
error tests added
This commit is contained in:
parent
8f985ecb94
commit
2da078a380
21
test/error_test.rb
Normal file
21
test/error_test.rb
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
require_relative "minitest_helper"
|
||||||
|
require_relative "../lib/voicemeeter"
|
||||||
|
|
||||||
|
class CAPIErrorTest < Minitest::Test
|
||||||
|
def test_it_raises_an_unknown_parameter_error
|
||||||
|
e = assert_raises(Voicemeeter::Errors::VMCAPIError) { Test.vm.set("Unknown.Parameter", 1) }
|
||||||
|
assert_equal(e.code, -3)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class InvalidKindTest < MiniTest::Test
|
||||||
|
def test_it_raises_an_invalid_kind_error
|
||||||
|
assert_raises(Voicemeeter::Errors::VMError) { Voicemeeter::Remote.new("unknown_kind") }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class UnknownConfigTest < MiniTest::Test
|
||||||
|
def test_it_raises_an_unknown_config_error
|
||||||
|
assert_raises(Voicemeeter::Errors::VMError) { Test.vm.apply_config(:unknown) }
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user