summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-02-22 08:22:51 -0700
committermo khan <mo@mokhan.ca>2014-02-22 08:22:51 -0700
commit04de304268a3bacec6a6ada46a0641c0b0e68ddf (patch)
tree34dadea5620e0c9df52681d868fd0b7ba72b4c92 /spec/models
parent224eef2913cba14d052554ff6276680ba62d6430 (diff)
add missing specs for confidential status.
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/license_status/confidential_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/models/license_status/confidential_spec.rb b/spec/models/license_status/confidential_spec.rb
new file mode 100644
index 0000000..2b13449
--- /dev/null
+++ b/spec/models/license_status/confidential_spec.rb
@@ -0,0 +1,17 @@
+require "spec_helper"
+
+describe LicenseStatus::Confidential do
+ let!(:public_license) { License.create(confidential: false) }
+ let!(:confidential_license) { License.create(confidential: true) }
+ subject { LicenseStatus::Confidential.new }
+
+ it "returns confidential results" do
+ results = subject.filter(License)
+ results.should include(confidential_license)
+ results.should_not include(public_license)
+ end
+
+ it "returns it's name" do
+ subject.to_s.should == 'confidential'
+ end
+end