Browse Source

Fix incorrect allowed URLs in CommentAppService test cases

- Updated test cases in CommentPublicAppService_Tests to include disallowed URLs as intended.
- Related to issue #20921
pull/20911/head
Suhaib 1 year ago
parent
commit
be4ae7c872
  1. 6
      modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentPublicAppService_Tests.cs

6
modules/cms-kit/test/Volo.CmsKit.Application.Tests/Comments/CommentPublicAppService_Tests.cs

@ -84,8 +84,8 @@ public class CommentPublicAppService_Tests : CmsKitApplicationTestBase
}
[Theory]
[InlineData("[ABP Community](https://abp.io/community/)")]
[InlineData("<a href='https://abp.io/docs/latest'>abp.io/docs</a>")]
[InlineData("[ABP Community](https://community.abp.io/)")] //not allowed URL
[InlineData("<a href='https://docs.abp.io/en/abp/latest'>docs.abp.io</a>")] //not allowed URL
public async Task CreateAsync_ShouldThrowUserFriendlyException_If_Url_UnAllowed(string text)
{
_currentUser.Id.Returns(_cmsKitTestData.User2Id);
@ -150,7 +150,7 @@ public class CommentPublicAppService_Tests : CmsKitApplicationTestBase
_cmsKitTestData.CommentWithChildId,
new UpdateCommentInput
{
Text = "[ABP Community - Update](https://abp.io/community/)", //not allowed URL
Text = "[ABP Community - Update](https://community.abp.io/)", //not allowed URL
}
));
}

Loading…
Cancel
Save