2021-12-06 09:07:53 +00:00
|
|
|
require "helper"
|
|
|
|
require "inspec/resource"
|
|
|
|
require "inspec/resources/timezone"
|
|
|
|
|
|
|
|
describe "Inspec::Resources::TimeZone" do
|
|
|
|
it "verify time configurations" do
|
|
|
|
resource = MockLoader.new(:centos7).load_resource("timezone")
|
|
|
|
_(resource.identifier).must_equal "Asia/Kolkata"
|
2021-12-07 12:46:44 +00:00
|
|
|
_(resource.name).must_equal "IST"
|
2021-12-06 09:07:53 +00:00
|
|
|
_(resource.time_offset).must_equal "+0530"
|
|
|
|
_(resource.stderr).must_equal ""
|
|
|
|
end
|
2021-12-07 12:46:44 +00:00
|
|
|
|
|
|
|
it "verify time configurations" do
|
|
|
|
resource = MockLoader.new(:windows).load_resource("timezone")
|
|
|
|
_(resource.identifier).must_equal "(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi"
|
|
|
|
_(resource.name).must_equal "India Standard Time"
|
|
|
|
_(resource.time_offset).must_equal "05:30:00"
|
|
|
|
_(resource.stderr).must_equal ""
|
|
|
|
end
|
2021-12-06 09:07:53 +00:00
|
|
|
end
|