feat(tickets): sweep all project boards for assigned tickets and tasks
This commit is contained in:
@@ -106,6 +106,20 @@ public sealed class TicketImportServiceTests : IDisposable
|
||||
Assert.Equal(1, await ctx.Tasks.CountAsync(t => t.TicketRef == "bandel:1"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Ticket_already_imported_into_another_list_is_not_imported_again()
|
||||
{
|
||||
var (import, ctx) = await HarnessAsync();
|
||||
ctx.Lists.Add(new ListEntity { Id = "l2", Name = "Other", CreatedAt = DateTime.UtcNow, DefaultCommitType = "chore" });
|
||||
await ctx.SaveChangesAsync();
|
||||
await SeedExistingTaskAsync(ctx, "l2", "bandel:1");
|
||||
|
||||
var result = await import.ImportAsync(ListId, CancellationToken.None);
|
||||
|
||||
Assert.Equal(1, result.Created); // only #3
|
||||
Assert.Equal(1, await ctx.Tasks.CountAsync(t => t.TicketRef == "bandel:1"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Throws_when_the_list_has_no_ticket_project()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user