From 9c4a428d85feaf89b6677425f96aef4141af8138 Mon Sep 17 00:00:00 2001 From: Arthur Neves Date: Sun, 21 Dec 2014 00:42:45 -0500 Subject: [PATCH] fix tests --- spec/controllers/apps_controller_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/controllers/apps_controller_spec.rb b/spec/controllers/apps_controller_spec.rb index 178702a..7bdd367 100644 --- a/spec/controllers/apps_controller_spec.rb +++ b/spec/controllers/apps_controller_spec.rb @@ -358,8 +358,10 @@ describe AppsController do end it "should destroy the app" do - expect(@app).to receive(:destroy) delete :destroy, :id => @app.id + expect { + @app.reload + }.to raise_error(Mongoid::Errors::DocumentNotFound) end it "should display a message" do @@ -397,7 +399,7 @@ describe AppsController do expect do post :regenerate_api_key, :id => app.id expect(request).to redirect_to edit_app_path(app) - end.to change { app.api_key } + end.to change { app.reload.api_key } end end end -- libgit2 0.21.2