Sha256: e813bfff4592cfdd465a66d1e99b22e0cb406ccd679667cb387b474aadb6038a

Contents?: true

Size: 246 Bytes

Versions: 6

Compression:

Stored size: 246 Bytes

Contents

RSpec.shared_examples_for "undestroyable" do
  let(:model) { described_class }

  it "is undestroyable" do
    obj = FactoryBot.build(model.to_s.underscore.to_sym)
    expect { obj.destroy }.to raise_error Commons::Errors::Unauthorized
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
commons_yellowme-0.16.0 spec/support/shared-examples/undestroyable.rb
commons_yellowme-0.15.0 spec/support/shared-examples/undestroyable.rb
commons_yellowme-0.12.0 spec/support/shared-examples/undestroyable.rb
commons_yellowme-0.11.3 spec/support/shared-examples/undestroyable.rb
commons_yellowme-0.11.2 spec/support/shared-examples/undestroyable.rb
commons_yellowme-0.11.1 spec/support/shared-examples/undestroyable.rb