Sha256: 851c3d82b75ce10191b8de049299667b5abe7ca21b82424d5a377aa6a04bb47e

Contents?: true

Size: 548 Bytes

Versions: 6

Compression:

Stored size: 548 Bytes

Contents

require 'spec_helper'

describe Sufia::GenericFile, type: :model do
  module VisibilityOverride
    extend ActiveSupport::Concern
    include Sufia::GenericFile::Permissions
    def visibility
      super
    end

    def visibility=(value)
      super(value)
    end
  end
  class MockParent < ActiveFedora::Base
    include VisibilityOverride
  end

  it 'allows for overrides of visibility' do
    expect do
      MockParent.new(visibility: Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE)
    end.to_not raise_error
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sufia-6.7.0 spec/models/generic_file/visibility_spec.rb
sufia-6.6.1 spec/models/generic_file/visibility_spec.rb
sufia-6.6.0 spec/models/generic_file/visibility_spec.rb
sufia-6.5.0 spec/models/generic_file/visibility_spec.rb
sufia-6.4.0 spec/models/generic_file/visibility_spec.rb
sufia-6.3.0 spec/models/generic_file/visibility_spec.rb