summaryrefslogtreecommitdiff
path: root/spec/controllers/application_controller_spec.rb
blob: 7ccca09f0dd5354e73ba7ba606e57e5d80c919bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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