diff options
| author | Gavin Miller <gavingmiller@gmail.com> | 2014-02-22 19:13:10 -0700 |
|---|---|---|
| committer | Gavin Miller <gavingmiller@gmail.com> | 2014-02-22 19:13:10 -0700 |
| commit | 18743c5981c59708d4143dfe75a5c111e67355e4 (patch) | |
| tree | 24901e40807d12df39f1259144f4a9f06127723b /spec/controllers/application_controller_spec.rb | |
| parent | 1fe046fd801be497f6176a1f882359ffcfaf6ce1 (diff) | |
| parent | ec7a4537c4559613e65e79ab780041c9666817b9 (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.rb | 28 |
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 |
