summaryrefslogtreecommitdiff
path: root/spec/controllers/application_controller_spec.rb
diff options
context:
space:
mode:
authorGavin Miller <gavingmiller@gmail.com>2014-02-22 19:13:10 -0700
committerGavin Miller <gavingmiller@gmail.com>2014-02-22 19:13:10 -0700
commit18743c5981c59708d4143dfe75a5c111e67355e4 (patch)
tree24901e40807d12df39f1259144f4a9f06127723b /spec/controllers/application_controller_spec.rb
parent1fe046fd801be497f6176a1f882359ffcfaf6ce1 (diff)
parentec7a4537c4559613e65e79ab780041c9666817b9 (diff)
Merge pull request #1 from mokhan/solution
Mergity Mergity Mergity
Diffstat (limited to 'spec/controllers/application_controller_spec.rb')
-rw-r--r--spec/controllers/application_controller_spec.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb
new file mode 100644
index 0000000..7ccca09
--- /dev/null
+++ b/spec/controllers/application_controller_spec.rb
@@ -0,0 +1,28 @@
+require "spec_helper"
+
+describe ApplicationController do
+ controller do
+ def index
+ render nothing: true
+ end
+
+ def show
+ raise "heck"
+ end
+ end
+
+ it "includes all well statuses with every response" do
+ get :index
+ assigns(:license_statuses).should =~ LicenseStatus::ALL
+ end
+
+ it "includes all well types with every response" 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