summaryrefslogtreecommitdiff
path: root/spec/controllers/application_controller_spec.rb
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-02-22 09:06:00 -0700
committermo khan <mo@mokhan.ca>2014-02-22 09:06:00 -0700
commit89b64a44f269bb6dfe68cdff8a168ee2a04ee9d6 (patch)
tree207133f4f90b4f53a07b9c03bb4b7d47c664616f /spec/controllers/application_controller_spec.rb
parent42a7b9e904f304de6f1a1b399de2868a3fc045c7 (diff)
add global error handler to respond with internal server error.
Diffstat (limited to 'spec/controllers/application_controller_spec.rb')
-rw-r--r--spec/controllers/application_controller_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb
index a26c465..7ccca09 100644
--- a/spec/controllers/application_controller_spec.rb
+++ b/spec/controllers/application_controller_spec.rb
@@ -5,6 +5,10 @@ describe ApplicationController do
def index
render nothing: true
end
+
+ def show
+ raise "heck"
+ end
end
it "includes all well statuses with every response" do
@@ -16,4 +20,9 @@ describe ApplicationController do
get :index
assigns(:well_types).should =~ WellType::ALL
end
+
+ it "handles errors gracefully" do
+ get :show, id: 1
+ response.status.should == 500
+ end
end