diff options
| author | mo khan <mo@mokhan.ca> | 2014-02-22 11:31:55 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-02-22 11:31:55 -0700 |
| commit | 0ab1fca101cdad532904d3df1fdf225625209ac0 (patch) | |
| tree | e1104eba8c9f3a429d8c7baaa718e4a3ad980c8e | |
| parent | ed601666363d62ca5a334c3c2414a1215118c019 (diff) | |
rename active_licenses to licenses to match jbuilder template.
| -rw-r--r-- | app/controllers/v1/company_licenses_controller.rb | 2 | ||||
| -rw-r--r-- | spec/controllers/v1/company_licenses_controller_spec.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/v1/company_licenses_controller.rb b/app/controllers/v1/company_licenses_controller.rb index 6f2f666..e3701d2 100644 --- a/app/controllers/v1/company_licenses_controller.rb +++ b/app/controllers/v1/company_licenses_controller.rb @@ -2,7 +2,7 @@ class V1::CompanyLicensesController < ApplicationController before_filter :load_company def index - @active_licenses = @company.filter_licenses_using(search_filters) + @licenses = @company.filter_licenses_using(search_filters) end private diff --git a/spec/controllers/v1/company_licenses_controller_spec.rb b/spec/controllers/v1/company_licenses_controller_spec.rb index c6f34c9..0ba61eb 100644 --- a/spec/controllers/v1/company_licenses_controller_spec.rb +++ b/spec/controllers/v1/company_licenses_controller_spec.rb @@ -15,13 +15,13 @@ describe V1::CompanyLicensesController do it "returns the active licenses" do company.stub(:filter_licenses_using).with({status: LicenseStatus::ACTIVE, township: nil}).and_return(active_licenses) get :index, company_id: company_id - assigns(:active_licenses).should == active_licenses + assigns(:licenses).should == active_licenses end it "returns the active licenses for a given township" do company.stub(:filter_licenses_using).with({status: LicenseStatus::ACTIVE, township: "123"}).and_return(active_licenses_in_township) get :index, company_id: company_id, township: "123" - assigns(:active_licenses).should == active_licenses_in_township + assigns(:licenses).should == active_licenses_in_township end end @@ -33,7 +33,7 @@ describe V1::CompanyLicensesController do it "finds expired licenses from a specific township" do get :index, company_id: company.id, status: "expired", township: "1" - assigns(:active_licenses).should include(license) + assigns(:licenses).should include(license) end end end |
