Sha256: 8c28ee15bb816faecd1f489bdb092c84f40f41b582f56090679d76b13607fd77
Contents?: true
Size: 998 Bytes
Versions: 5
Compression:
Stored size: 998 Bytes
Contents
require 'spec_helper' describe RightsService do before do # Configure QA to use fixtures qa_fixtures = { local_path: File.expand_path('../../fixtures/authorities', __FILE__) } stub_const("Qa::Authorities::LocalSubauthority::AUTHORITIES_CONFIG", qa_fixtures) end describe "#select_options" do it "returns active terms" do expect(described_class.select_options).to include(["First Active Term", "demo_id_01"], ["Second Active Term", "demo_id_02"]) end it "does not return inactive terms" do expect(described_class.select_options).not_to include(["Third is an Inactive Term", "demo_id_03"], ["Fourth is an Inactive Term", "demo_id_04"]) end end describe "#label" do it "resolves for ids of active terms" do expect(described_class.label('demo_id_01')).to eq("First Active Term") end it "resolves for ids of inactive terms" do expect(described_class.label('demo_id_03')).to eq("Third is an Inactive Term") end end end
Version data entries
5 entries across 5 versions & 1 rubygems