33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using GmRelay.Bot.Features.Sessions.RescheduleSession;
|
|
|
|
namespace GmRelay.Bot.Tests.Features.Sessions.RescheduleSession;
|
|
|
|
public sealed class HandleRescheduleTimeInputHandlerTests
|
|
{
|
|
[Fact]
|
|
public void BuildVotingMessage_ShouldShowApprovedAndPendingParticipants()
|
|
{
|
|
var approvedId = Guid.NewGuid();
|
|
var pendingId = Guid.NewGuid();
|
|
var currentTime = new DateTime(2026, 4, 25, 16, 30, 0, DateTimeKind.Utc);
|
|
var newTime = new DateTimeOffset(2026, 4, 26, 17, 0, 0, TimeSpan.Zero);
|
|
var participants = new List<VoteParticipantDto>
|
|
{
|
|
new(approvedId, "Alice", "alice"),
|
|
new(pendingId, "Bob", null)
|
|
};
|
|
|
|
var text = HandleRescheduleTimeInputHandler.BuildVotingMessage(
|
|
"Shadowrun",
|
|
currentTime,
|
|
newTime,
|
|
participants,
|
|
[approvedId]);
|
|
|
|
Assert.Contains("Shadowrun", text);
|
|
Assert.Contains("✅ @alice", text);
|
|
Assert.Contains("⏳ Bob", text);
|
|
Assert.Contains("Голоса: 1/2 ✅", text);
|
|
}
|
|
}
|