feat: add a wait before a notice can be accepted
This commit is contained in:
@@ -143,6 +143,18 @@ public class NoticeRulesTests
|
||||
Assert.NotNull(NoticeRules.ValidateDraft(new NoticeDraft { Title = title }));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(-1, false)]
|
||||
[InlineData(0, true)]
|
||||
[InlineData(600, true)]
|
||||
[InlineData(601, false)]
|
||||
public void Draft_AcceptDelayHasToBeInRange(int seconds, bool valid)
|
||||
{
|
||||
var draft = new NoticeDraft { Title = "Hi", RequireAccept = true, AcceptDelaySeconds = seconds };
|
||||
|
||||
Assert.Equal(valid, NoticeRules.ValidateDraft(draft) is null);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Draft_SelectedUsersNeedAtLeastOneUser()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user