summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-02-21 20:27:36 -0700
committermo khan <mo@mokhan.ca>2014-02-21 20:27:36 -0700
commitfbb41be394f841ce0878eb0512fbacff1a588ab7 (patch)
tree97e6a977598e49c24f7765335077eaa504209e64 /spec/models
parent5d937942170c81bcb2304cab1c71eefda48e4e35 (diff)
add confidential well license status.
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/company_spec.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/models/company_spec.rb b/spec/models/company_spec.rb
index 4b5f7ce..1acef1c 100644
--- a/spec/models/company_spec.rb
+++ b/spec/models/company_spec.rb
@@ -6,7 +6,7 @@ describe Company do
let(:today) { DateTime.now }
let!(:active_license) { company.licenses.create(issued_at: 1.day.ago, expired_at: 1.day.from_now) }
let!(:expired_license) { company.licenses.create(issued_at: 2.days.ago, expired_at: 1.day.ago ) }
- let!(:pending_license) { company.licenses.create(issued_at: 2.days.from_now, expired_at: 3.days.from_now ) }
+ let!(:confidential_license) { company.licenses.create(issued_at: 2.days.from_now, expired_at: 3.days.from_now, confidential: true) }
it "returns all the licenses that are active" do
licenses = company.status(LicenseStatus::ACTIVE)
@@ -20,7 +20,10 @@ describe Company do
licenses.should include(expired_license)
end
- pending "returns all confidential licenses" do
+ it "returns all confidential licenses" do
+ licenses = company.status(LicenseStatus::CONFIDENTIAL)
+ licenses.count.should == 1
+ licenses.should include(confidential_license)
end
end
end