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