summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/controllers/v1/company_licenses_controller_spec.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/spec/controllers/v1/company_licenses_controller_spec.rb b/spec/controllers/v1/company_licenses_controller_spec.rb
index 0ba61eb..636537c 100644
--- a/spec/controllers/v1/company_licenses_controller_spec.rb
+++ b/spec/controllers/v1/company_licenses_controller_spec.rb
@@ -7,19 +7,16 @@ describe V1::CompanyLicensesController do
let(:active_licenses) { ["active"] }
let(:active_licenses_in_township) { ["active township"] }
- before :each do
- Company.stub(:find).with(company_id).and_return(company)
- active_licenses.stub(:township).with("123").and_return(active_licenses_in_township)
- end
+ before { Company.stub(:find).with(company_id).and_return(company) }
it "returns the active licenses" do
- company.stub(:filter_licenses_using).with({status: LicenseStatus::ACTIVE, township: nil}).and_return(active_licenses)
+ company.stub(:filter_licenses_using).with(status: LicenseStatus::ACTIVE, township: nil).and_return(active_licenses)
get :index, company_id: company_id
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)
+ 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(:licenses).should == active_licenses_in_township
end