mirror of
https://github.com/onyx-and-iris/obsws-ruby.git
synced 2024-11-15 18:50:47 +00:00
refactor tests
This commit is contained in:
parent
3ef4396885
commit
299351cac0
@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
obsws (0.5.4)
|
||||
obsws (0.5.5)
|
||||
waitutil (~> 0.2.1)
|
||||
websocket-driver (~> 0.7.5)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
require_relative "../minitest_helper"
|
||||
|
||||
class AttrsTest < OBSWSTest
|
||||
class AttrsTest < Minitest::Test
|
||||
def test_get_version_attrs
|
||||
resp = OBSWSTest.r_client.get_version
|
||||
assert resp.attrs ==
|
||||
|
@ -2,8 +2,11 @@ require_relative "../minitest_helper"
|
||||
|
||||
class OBSWSConnectionErrorTest < Minitest::Test
|
||||
def test_it_raises_an_obsws_connection_error_on_wrong_password
|
||||
e = assert_raises(OBSWS::OBSWSConnectionError) { OBSWS::Requests::Client.new(host: "localhost", port: 4455, password: "wrongpassword", connect_timeout: 1).new }
|
||||
assert_equal(e.message, "Timed out waiting for successful identification (1 seconds elapsed)")
|
||||
e = assert_raises(OBSWS::OBSWSConnectionError) do
|
||||
OBSWS::Requests::Client
|
||||
.new(host: "localhost", port: 4455, password: "wrongpassword", connect_timeout: 0.1)
|
||||
end
|
||||
assert_equal(e.message, "Timed out waiting for successful identification (0.1 seconds elapsed)")
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
require_relative "../minitest_helper"
|
||||
|
||||
class RequestTest < OBSWSTest
|
||||
class RequestTest < Minitest::Test
|
||||
def test_it_checks_obs_major_version
|
||||
resp = OBSWSTest.r_client.get_version
|
||||
ver = resp.obs_version.split(".").map(&:to_i)
|
||||
|
Loading…
Reference in New Issue
Block a user