This commit is contained in:
6
util.cs
6
util.cs
@@ -411,15 +411,15 @@ namespace raven_integration
|
||||
/// <param name="a"></param>
|
||||
/// <param name="target"></param>
|
||||
/// <param name="error"></param>
|
||||
public static void ShouldContainValidationError(ApiResponse a, string target, string error, string message = null)
|
||||
public static void ShouldContainValidationError(ApiResponse a, string target, string error, string shouldContainInMessage = null)
|
||||
{
|
||||
a.ObjectResponse["error"]["details"].Should().NotBeNull("There should be Details on the api call");
|
||||
if (message != null)
|
||||
if (shouldContainInMessage != null)
|
||||
{
|
||||
a.ObjectResponse["error"]["details"].Should().Contain(
|
||||
m => m["target"].Value<string>() == target &&
|
||||
m["error"].Value<string>() == error &&
|
||||
m["message"].Value<string>() == message);
|
||||
m["message"].Value<string>().Contains(shouldContainInMessage));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user