mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
Getting model by invalid ID throws a more specific exception.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Lifecycle;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
@@ -31,7 +32,7 @@ namespace NzbDrone.Core.Test.Qualities
|
||||
public void should_throw_with_id_if_not_exist()
|
||||
{
|
||||
var id = 123;
|
||||
Assert.Throws<InvalidOperationException>(()=> Subject.GetByQualityId(id)).Message.Contains(id.ToString());
|
||||
Assert.Throws<ModelNotFoundException>(()=> Subject.GetByQualityId(id)).Message.Contains(id.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user