From: Jan Provaznik jprovazn@redhat.com
--- src/spec/controllers/templates_controller_spec.rb | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/spec/controllers/templates_controller_spec.rb b/src/spec/controllers/templates_controller_spec.rb index bdd4290..6e23609 100644 --- a/src/spec/controllers/templates_controller_spec.rb +++ b/src/spec/controllers/templates_controller_spec.rb @@ -33,19 +33,18 @@ describe TemplatesController do hydra = Typhoeus::Hydra.hydra hydra.stub(:put, %r{http://localhost:9090/templates/.*%7D).and_return( Typhoeus::Response.new(:code => 200)) + Factory.create(:mock_cloud_account) end
it "should create a new Image" do - mock = Factory.create(:mock_provider) lambda do - post :build, :image => {:template_id => @template.id}, :targets => ["mock"] + post :build, :template_id => @template.id, :targets => ["mock"] end.should change(Image, :count).by(1) end
it "should create a new ReplicatedImage" do - mock = Factory.create(:mock_provider) lambda do - post :build, :image => {:template_id => @template.id}, :targets => ["mock"] + post :build, :template_id => @template.id, :targets => ["mock"] end.should change(ReplicatedImage, :count).by(1) end end