Created
September 7, 2016 20:27
-
-
Save selmanj/0c322803464b9b7d5032ad95ca732457 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe ManageIQ::Providers::Google::CloudManager::RefreshParser do | |
it 'doesnt entirely crash when pulling data' do | |
empty_collection = double(Fog::Collection, :all => []) | |
connection = double( | |
"Fog::Compute::Google::Real", | |
:disks => empty_collection, | |
:flavors => [], | |
:forwarding_rules => empty_collection, | |
:images => empty_collection, | |
:projects => double( | |
"Fog::Collection", | |
:get => double(:common_instance_metadata => {}), | |
:all => []), | |
:servers => empty_collection, | |
:snapshots => empty_collection, | |
:target_pools => empty_collection, | |
:zones => empty_collection) | |
ems = instance_double( | |
"ManageIQ::Providers::Google::CloudManager", | |
:name => "GoogleStub", | |
:id => 11, | |
:project => "foobar", | |
:connect => connection) | |
parser = ManageIQ::Providers::Google::CloudManager::RefreshParser.new(ems) | |
puts parser.ems_inv_to_hashes | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment