Sha256: 002e4ec1ca0378142f3145d4c484aed4b95b62d2c2e0a0810b24737e304b0c1c

Contents?: true

Size: 738 Bytes

Versions: 10

Compression:

Stored size: 738 Bytes

Contents

module Sipity
  RSpec.describe Comment, type: :model, no_clean: true do
    context 'database configuration' do
      subject { described_class }
      its(:column_names) { is_expected.to include('entity_id') }
      its(:column_names) { is_expected.to include('agent_id') }
      its(:column_names) { is_expected.to include('comment') }
    end

    describe '#name_of_commentor' do
      let(:instance) { described_class.new }
      subject { instance.name_of_commentor }
      let(:agent) { instance_double(Agent, proxy_for: user) }
      let(:user) { instance_double(User, to_s: 'Hiya') }

      before do
        allow(instance).to receive(:agent).and_return(agent)
      end
      it { is_expected.to eq('Hiya') }
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
hyrax-1.1.1 spec/models/sipity/comment_spec.rb
hyrax-1.1.0 spec/models/sipity/comment_spec.rb
hyrax-1.0.5 spec/models/sipity/comment_spec.rb
hyrax-1.0.4 spec/models/sipity/comment_spec.rb
hyrax-1.0.3 spec/models/sipity/comment_spec.rb
hyrax-1.0.2 spec/models/sipity/comment_spec.rb
hyrax-1.0.1 spec/models/sipity/comment_spec.rb
hyrax-1.0.0.rc2 spec/models/sipity/comment_spec.rb
hyrax-1.0.0.rc1 spec/models/sipity/comment_spec.rb
test_hyrax-0.0.1.alpha spec/models/sipity/comment_spec.rb