Sha256: 0ace16385376e7317d770f7f2bcf3d2c142042ea28d8bc535d0f8a473d54071a
Contents?: true
Size: 680 Bytes
Versions: 1
Compression:
Stored size: 680 Bytes
Contents
require 'spec_helper' module Ddr module Models RSpec.describe SolrDocument, type: :model do describe "#principal_has_role?" do let(:document) { ::SolrDocument.new("admin_metadata__role_ssim"=>[ "inst.faculty", "inst.staff", "inst.student" ]) } context "user does not have role" do it "should return false" do expect(document.principal_has_role?([ "registered" ], "role")).to be false end end context "user does have role" do it "should return true" do expect(document.principal_has_role?([ "inst.staff" ], "role")).to be true end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ddr-models-1.11.8 | spec/models/solr_document_spec.rb |