Sha256: 1a7239a325b00bad20c20361a099f0230a5368db351c6966604b27bdcea4c5b5
Contents?: true
Size: 745 Bytes
Versions: 13
Compression:
Stored size: 745 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 require "spec_helper" describe Mongoid::Errors::DeleteRestriction do describe "#message" do let(:error) do described_class.new(Person.new, :drugs) end it "contains the problem in the message" do expect(error.message).to include( "Cannot delete Person because of dependent 'drugs'." ) end it "contains the summary in the message" do expect(error.message).to include( "When defining 'drugs' with a :dependent => :restrict," ) end it "contains the resolution in the message" do expect(error.message).to include( "Don't attempt to delete the parent Person when it has children" ) end end end
Version data entries
13 entries across 13 versions & 2 rubygems