feat: Anhänge je Stunde, Klausur-Sitzplan mischen, Gefährdungsbeurteilungs-Assistent
Lesson bekommt dieselbe Anhang-Infrastruktur wie Documentation (Material, Arbeitsblätter, Experimentunterlagen), samt Fix einer Sync-Lücke, die Anhang- Dateibytes bisher nur für Documentation statt generisch übertragen hat (IHasAttachments). Sitzplan-Tab bekommt einen "Plätze mischen"-Button für Klausursitzpläne. Neu: mehrschrittiger Gefährdungsbeurteilungs-Assistent mit optionalem KI-Entwurf (ai-backend/gbu.php) und PDF-Export, Format bewusst als JSON-Anhang statt eigener Datenbank-Entität. Details und Architekturentscheidungen in TODO.md (4.2, 7.1.5, 10.1.8). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -740,6 +740,25 @@ public sealed class RepositoryTests
|
||||
Assert.Equal(2, result[2].LessonNumber);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LessonRepository_DeleteRaeumtAnhaengeAusDerAttachmentAblageAuf()
|
||||
{
|
||||
using var db = NewInMemoryContext();
|
||||
var repo = new LessonRepository(db);
|
||||
var lesson = new Lesson
|
||||
{
|
||||
UnitId = Guid.NewGuid(), GroupId = Guid.NewGuid(),
|
||||
Attachments = [new DocumentAttachment { StorageId = "gbu-1", FileName = "gbu.pdf" }],
|
||||
};
|
||||
db.Attachments.Upload("gbu-1", "gbu.pdf", new MemoryStream([1, 2, 3]));
|
||||
repo.Save(lesson);
|
||||
|
||||
repo.Delete(lesson.Id);
|
||||
|
||||
Assert.Null(db.Lessons.FindById(lesson.Id));
|
||||
Assert.False(db.Attachments.Exists("gbu-1"));
|
||||
}
|
||||
|
||||
// ── ShorthandCodeRepository ───────────────────────────────────────────────
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user