refactor: 移除平台侧能力并收紧租户隔离
This commit is contained in:
@@ -62,7 +62,7 @@ public sealed class CreateAnnouncementCommandValidatorTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GivenTenantIdZeroAndNotPlatform_WhenValidate_ThenShouldHaveError()
|
||||
public void GivenTenantIdZero_WhenValidate_ThenShouldHaveError()
|
||||
{
|
||||
// Arrange
|
||||
var command = AnnouncementTestData.CreateValidCreateCommand() with
|
||||
@@ -75,7 +75,23 @@ public sealed class CreateAnnouncementCommandValidatorTests
|
||||
var result = _validator.TestValidate(command);
|
||||
|
||||
// Assert
|
||||
result.ShouldHaveValidationErrorFor(x => x);
|
||||
result.ShouldHaveValidationErrorFor(x => x.TenantId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GivenPlatformPublisherScope_WhenValidate_ThenShouldHaveError()
|
||||
{
|
||||
// Arrange
|
||||
var command = AnnouncementTestData.CreateValidCreateCommand() with
|
||||
{
|
||||
PublisherScope = PublisherScope.Platform
|
||||
};
|
||||
|
||||
// Act
|
||||
var result = _validator.TestValidate(command);
|
||||
|
||||
// Assert
|
||||
result.ShouldHaveValidationErrorFor(x => x.PublisherScope);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user