additionals/test/unit/additionals_info_test.rb

26 lines
528 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require File.expand_path '../../test_helper', __FILE__
2021-03-02 13:47:10 +03:00
class AdditionalsInfoTest < Additionals::TestCase
def test_system_infos
infos = AdditionalsInfo.new.system_infos
2022-10-30 19:08:52 +03:00
2024-01-21 08:54:44 +03:00
assert_kind_of Hash, infos
2023-09-24 10:31:09 +03:00
assert_operator infos.count, :>=, 3
end
2021-03-02 13:47:10 +03:00
def test_system_info
2021-09-03 18:42:57 +03:00
text = AdditionalsInfo.new.system_info
2022-10-30 19:08:52 +03:00
assert_not_empty text
2021-03-02 13:47:10 +03:00
assert_not_equal 'unknown', text
end
def test_system_uptime
info = AdditionalsInfo.new.system_uptime
2022-10-30 19:08:52 +03:00
assert info.present?
2021-03-02 13:47:10 +03:00
end
end