summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/models/license_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/license_spec.rb b/spec/models/license_spec.rb
index a939372..a53fcbe 100644
--- a/spec/models/license_spec.rb
+++ b/spec/models/license_spec.rb
@@ -29,4 +29,17 @@ describe License do
results.first.should == newest_license
end
end
+
+ describe ".township" do
+ let(:location) { Location.create(township: "2") }
+ let!(:license) { License.create(location: location) }
+ let(:other_location) { Location.create(township: "1") }
+ let!(:other_license) { License.create(location: other_location) }
+
+ it "returns a license in the township" do
+ results = License.township("2")
+ results.count.should == 1
+ results.should include(license)
+ end
+ end
end