autodiscover/test/units/server_version_parser_test.rb

18 lines
451 B
Ruby
Raw Permalink Normal View History

2024-11-23 04:12:14 +00:00
require "test_helper"
2024-11-23 04:10:41 +00:00
2024-11-23 04:12:14 +00:00
describe Autodiscover::ServerVersionParser do
let(:_class) { Autodiscover::ServerVersionParser }
2024-11-23 04:10:41 +00:00
2024-11-23 04:12:14 +00:00
it "parses a hex ServerVersion response" do
inst = _class.new("738180DA")
_(inst.major).must_equal 14
_(inst.minor).must_equal 1
_(inst.build).must_equal 218
2024-11-23 04:10:41 +00:00
end
2024-11-23 04:12:14 +00:00
it "returns an Exchange Server Version" do
inst = _class.new("738180DA")
inst.exchange_version.must_equal "Exchange2010_SP1"
2024-11-23 04:10:41 +00:00
end
2024-11-23 04:12:14 +00:00
end