1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-22 02:51:33 +01:00

fix tests

This commit is contained in:
Kyle Spearrin 2019-03-02 15:28:32 -05:00
parent 15cb0ad4c3
commit 6922cff638

View File

@ -47,9 +47,7 @@ namespace Bit.Core.Test.Services
var ex = await Assert.ThrowsAsync<BadRequestException>(() => collectionService.SaveAsync(collection));
Assert.Equal("The model state is invalid.", ex.Message);
Assert.Equal(1, ex.ModelState.ErrorCount);
Assert.Equal("Organization not found", ex.ModelState.Root.Errors[0].ErrorMessage);
Assert.Equal("Organization not found", ex.Message);
}
[Fact]
@ -109,10 +107,8 @@ namespace Bit.Core.Test.Services
// verify & expect exception to be thrown
var ex = await Assert.ThrowsAsync<BadRequestException>(() => collectionService.SaveAsync(testCollection));
Assert.Equal("The model state is invalid.", ex.Message);
Assert.Equal(1, ex.ModelState.ErrorCount);
Assert.Equal("You have reached the maximum number of collections (2) for this organization.",
ex.ModelState.Root.Errors[0].ErrorMessage);
ex.Message);
}
[Fact]