Sha256: 72a761b3969183862280abd6f4a94b0300f5faeb050430142ad745735d3f9f7c

Contents?: true

Size: 897 Bytes

Versions: 12

Compression:

Stored size: 897 Bytes

Contents

# frozen_string_literal: true

RSpec.shared_examples 'Subjects' do
  context 'AAF shared implementation' do
    subject { build :subject }

    it { is_expected.to be_valid }
    it { is_expected.to be_an(Accession::Principal) }
    it { is_expected.to respond_to(:roles) }
    it { is_expected.to respond_to(:permissions) }
    it { is_expected.to respond_to(:permits?) }
    it { is_expected.to respond_to(:functioning?) }

    it 'is invalid without a name' do
      subject.name = nil
      expect(subject).not_to be_valid
    end
    it 'is invalid without mail' do
      subject.mail = nil
      expect(subject).not_to be_valid
    end
    it 'is invalid without an enabled state' do
      subject.enabled = nil
      expect(subject).not_to be_valid
    end
    it 'is invalid without a complete state' do
      subject.complete = nil
      expect(subject).not_to be_valid
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
aaf-gumboot-2.6.0 lib/gumboot/shared_examples/subjects.rb
aaf-gumboot-2.5.1 lib/gumboot/shared_examples/subjects.rb
aaf-gumboot-2.5.0 lib/gumboot/shared_examples/subjects.rb
aaf-gumboot-2.4.0 lib/gumboot/shared_examples/subjects.rb
aaf-gumboot-2.2.0 lib/gumboot/shared_examples/subjects.rb
aaf-gumboot-2.1.4 lib/gumboot/shared_examples/subjects.rb
aaf-gumboot-2.1.3 lib/gumboot/shared_examples/subjects.rb
aaf-gumboot-2.1.1 lib/gumboot/shared_examples/subjects.rb
aaf-gumboot-2.1.0 lib/gumboot/shared_examples/subjects.rb
aaf-gumboot-2.0.1 lib/gumboot/shared_examples/subjects.rb
aaf-gumboot-1.2.0 lib/gumboot/shared_examples/subjects.rb
aaf-gumboot-1.1.0 lib/gumboot/shared_examples/subjects.rb