Skip to content

Instantly share code, notes, and snippets.

@blomquisg
Created October 20, 2016 16:40
Show Gist options
  • Save blomquisg/60d37ea047678b19b0f30554f7e921c0 to your computer and use it in GitHub Desktop.
Save blomquisg/60d37ea047678b19b0f30554f7e921c0 to your computer and use it in GitHub Desktop.
Simple spec testing out lenovo refresh
describe ManageIQ::Providers::Lenovo::PhysicalInfraManager::RefreshParser do
it "converts ems inventory to hashes" do
node = double("Fake Node", :uuid => "uuid", :hostname => "host", :macAddress => "mac", :description => "description")
connection = double("Fake connection", :discover_nodes => [node])
ems = double("Fake Ems", :name => "Fake Lenovo", :id => 123, :connect => connection)
parser = described_class.new(ems)
hashes = parser.ems_inv_to_hashes
expect(hashes).to include(:nodeList)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment