mirror of
https://github.com/inspec/inspec
synced 2024-11-23 05:03:07 +00:00
call class insteader of loader
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
58fd1311c5
commit
f88404a865
1 changed files with 11 additions and 15 deletions
|
@ -244,22 +244,18 @@ describe "Inspec::Resources::Http" do
|
|||
end
|
||||
end
|
||||
|
||||
describe "Windows" do
|
||||
describe "Windows" do
|
||||
let(:backend) { MockLoader.new.backend }
|
||||
let(:http_method) { "GET" }
|
||||
let(:url) { "http://www.example.com" }
|
||||
let(:opts) { {} }
|
||||
let(:worker) { Inspec::Resources::Http::Worker::Remote.new(backend, http_method, url, opts) }
|
||||
|
||||
# windows
|
||||
it "simple HTTP request with no options" do
|
||||
resource = MockLoader.new(:windows).load_resource("http", "https://www.example.com")
|
||||
params = Hashie::Mash.new({})
|
||||
_(resource.send("status")).must_equal 200
|
||||
# _(resource.status).must_equal 200
|
||||
# _(resource.name).must_equal "dhcp"
|
||||
# _(resource.description).must_equal "DHCP Client"
|
||||
# _(resource.installed?).must_equal true
|
||||
# _(resource.enabled?).must_equal true
|
||||
# _(resource.running?).must_equal true
|
||||
# _(resource.startmode). must_equal "Auto"
|
||||
# _(resource.startname). must_equal "LocalSystem"
|
||||
# _(resource.params).must_equal params
|
||||
describe "simple HTTP request with no options" do
|
||||
it "returns correct data" do
|
||||
_(worker.status).must_equal 200
|
||||
_(worker.body).must_equal "no options"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue