summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-02-21 20:57:18 -0700
committermo khan <mo@mokhan.ca>2014-02-21 20:57:18 -0700
commitf6eebdeb6aa56c4734102caf1817479d9e7b2765 (patch)
tree7b442f97daa5a42c04bd8b944f80d3e06985a981 /spec/controllers
parentea2de48ec543fb341be31e9ed312b72ede860aee (diff)
load well statuses and well types with each request to the company licenses controller.
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/v1/company_licenses_controller_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/controllers/v1/company_licenses_controller_spec.rb b/spec/controllers/v1/company_licenses_controller_spec.rb
index 2784a1d..c139f8b 100644
--- a/spec/controllers/v1/company_licenses_controller_spec.rb
+++ b/spec/controllers/v1/company_licenses_controller_spec.rb
@@ -27,5 +27,15 @@ describe V1::CompanyLicensesController do
xhr :get, :index, company_id: company_id, township: "123"
assigns(:active_licenses).should == active_licenses_in_township
end
+
+ it "includes each well status" do
+ xhr :get, :index, company_id: company_id
+ assigns(:license_statuses).should =~ LicenseStatus::ALL
+ end
+
+ it "includes each well type" do
+ xhr :get, :index, company_id: company_id
+ assigns(:well_types).should =~ WellType::ALL
+ end
end
end