mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-13 13:29:59 +01:00
Remove obsolete raise and adjust spec
This commit is contained in:
parent
754335143b
commit
ae5092c7ed
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue