From 04de304268a3bacec6a6ada46a0641c0b0e68ddf Mon Sep 17 00:00:00 2001 From: mo khan Date: Sat, 22 Feb 2014 08:22:51 -0700 Subject: add missing specs for confidential status. --- spec/models/license_status/confidential_spec.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 spec/models/license_status/confidential_spec.rb (limited to 'spec') 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 -- cgit v1.2.3