summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-02-21 22:31:38 -0700
committermo khan <mo@mokhan.ca>2014-02-21 22:31:38 -0700
commitb50a9b42f1cddc78f75f75913f39bd19fbf4d8d5 (patch)
treeb112ad20d9bb0c46b63e5bf74ed2d2e050994b11 /spec/models
parent60aa8fa77deaf9d4c90c1ede37caeeff13ee283d (diff)
add well type to licenses table.
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/license_spec.rb22
1 files changed, 12 insertions, 10 deletions
diff --git a/spec/models/license_spec.rb b/spec/models/license_spec.rb
index d35c51f..ac4c37c 100644
--- a/spec/models/license_spec.rb
+++ b/spec/models/license_spec.rb
@@ -30,17 +30,19 @@ describe License do
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)
+ describe "#apply_for" do
+ context "when applying for a license" do
+ it "creates a new license" 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
+ license.company.should == user.company
+ license.well_type.should == WellType::NFW
+ license.location.should == location
+ license.applicant.should == user
+ end
end
end
end