summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/models/license_spec.rb16
-rw-r--r--spec/models/user_spec.rb19
2 files changed, 19 insertions, 16 deletions
diff --git a/spec/models/license_spec.rb b/spec/models/license_spec.rb
index 8fbf01a..a939372 100644
--- a/spec/models/license_spec.rb
+++ b/spec/models/license_spec.rb
@@ -29,20 +29,4 @@ describe License do
results.first.should == newest_license
end
end
-
- 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
- end
- end
- end
end
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
new file mode 100644
index 0000000..02e52be
--- /dev/null
+++ b/spec/models/user_spec.rb
@@ -0,0 +1,19 @@
+require "spec_helper"
+
+describe User do
+ 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.create(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
+end