Fix Cms Kit failing tests

resolves https://github.com/abpframework/abp/issues/5570
pull/5599/head
Yunus Emre Kalkan 5 years ago
parent c68018b3f4
commit 160916d23e

@ -44,7 +44,7 @@ namespace Volo.CmsKit.Ratings
UsingDbContext(context =>
{
var ratings = context.Set<Rating>().Where(x =>
x.EntityId == _cmsKitTestData.EntityId1 && x.EntityType == _cmsKitTestData.EntityType1).ToList();
x.EntityId == _cmsKitTestData.EntityId2 && x.EntityType == _cmsKitTestData.EntityType1).ToList();
ratings
.Any(c => c.Id == newRating.Id && c.CreatorId == newRating.CreatorId &&

@ -32,6 +32,7 @@ namespace Volo.CmsKit.Reactions
public async Task GetForSelectionAsync()
{
_currentUser.Id.Returns(_cmsKitTestData.User1Id);
_currentUser.IsAuthenticated.Returns(true);
var reactions = await _reactionPublicAppService.GetForSelectionAsync(
_cmsKitTestData.EntityType2,

@ -21,11 +21,11 @@ namespace Volo.CmsKit.Reactions
{
var reactions = await _reactionManager.GetReactionsAsync();
reactions.Count.ShouldBe(8);
reactions.Count.ShouldBe(12);
var reactionsByEntityType = await _reactionManager.GetReactionsAsync(_cmsKitTestData.EntityType1);
reactionsByEntityType.Count.ShouldBe(8);
reactionsByEntityType.Count.ShouldBe(12);
}
[Fact]

Loading…
Cancel
Save