summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-02-21 22:27:13 -0700
committermo khan <mo@mokhan.ca>2014-02-21 22:27:13 -0700
commit60aa8fa77deaf9d4c90c1ede37caeeff13ee283d (patch)
tree2e2783442eb09d58e4257bf4f256ecc4ce25aa6b /spec/models
parent476bee1ff1e1c0d4fe553898f5f029530a41919c (diff)
define well types table.
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/license_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/license_spec.rb b/spec/models/license_spec.rb
index a939372..d35c51f 100644
--- a/spec/models/license_spec.rb
+++ b/spec/models/license_spec.rb
@@ -29,4 +29,18 @@ describe License do
results.first.should == newest_license
end
end
+
+ describe "model" do
+ it "looks like this" do
+ company = Company.create(name: 'ABC Resources Ltd.')
+ user = User.new(company: company)
+ location = Location.new(latitude: 51.06, longitude: -114.09, township: '1')
+ license = user.apply_for(WellType::NFW, location)
+
+ license.company.should == user.company
+ license.well_type.should == WellType::NFW
+ license.location.should == location
+ license.applicant.should == user
+ end
+ end
end