Skip to content

Commit

Permalink
Added unit test for query_resource method.
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhu-das committed May 29, 2014
1 parent a80dfbb commit cfa8db1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/unit/openstack_network_list_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,12 @@
expect { instance.validate! }.to raise_error(Chef::Knife::Cloud::CloudExceptions::ValidationError)
end
end

context "query_resource" do
it "returns the networks using the fog service." do
instance.service = double
instance.service.should_receive(:list_networks)
instance.query_resource
end
end
end

0 comments on commit cfa8db1

Please sign in to comment.