Remove obsolete raise and adjust spec

This commit is contained in:
Andreas Nedbal 2025-03-09 19:37:22 +01:00 committed by Andreas Nedbal
parent 754335143b
commit ae5092c7ed
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ module UseCase
end
def check_object_exists
raise Errors::NotFound.new("#{object_type.capitalize} not found") unless object
object
end
def create_report

View file

@ -33,7 +33,7 @@ describe UseCase::Report::Create do
shared_examples "object not found" do
it "raises an error" do
expect { subject }.to raise_error(Errors::NotFound, "#{object_type.capitalize} not found")
expect { subject }.to raise_error(ActiveRecord::RecordNotFound)
end
end