Browse Source

Fix Cms Kit failing tests

resolves https://github.com/abpframework/abp/issues/5570
pull/5599/head
Yunus Emre Kalkan 5 years ago
parent
commit
160916d23e
  1. 2
      modules/cms-kit/test/Volo.CmsKit.Application.Tests/Ratings/RatingPublicAppService_Tests.cs
  2. 1
      modules/cms-kit/test/Volo.CmsKit.Application.Tests/Reactions/ReactionPublicAppService_Tests.cs
  3. 4
      modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Reactions/ReactionManager_Tests.cs

2
modules/cms-kit/test/Volo.CmsKit.Application.Tests/Ratings/RatingPublicAppService_Tests.cs

@ -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 &&

1
modules/cms-kit/test/Volo.CmsKit.Application.Tests/Reactions/ReactionPublicAppService_Tests.cs

@ -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,

4
modules/cms-kit/test/Volo.CmsKit.Domain.Tests/Reactions/ReactionManager_Tests.cs

@ -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