Blame view

test/client_test.rb 509 Bytes
51fb5579   Isaac Lewis   add client test, ...
1
2
3
4
5
  require "test_helper"
  
  class SysproClientTest < Minitest::Test
    def test_get_syspro_version
      client = ::Syspro::SysproClient.new
697a8854   Isaac Lewis   update tests
6
      assert_match (/(\d+\.)?(\d+\.)?(\d+\.)?(\d+)/), client.get_syspro_version.version
51fb5579   Isaac Lewis   add client test, ...
7
    end
0c0af54a   Isaac Lewis   error handling; c...
8
9
10
11
12
13
14
15
16
17
18
  
    def test_client_block_execution
      client = ::Syspro::SysproClient.new
  
      version, resp = client.request {
        Syspro::GetVersion.get_version
      }
  
      assert_match version.version, resp.http_body
      assert_match (/(\d+\.)?(\d+\.)?(\d+\.)?(\d+)/), version.version
    end
51fb5579   Isaac Lewis   add client test, ...
19
  end