test: add backend security regression test foundation

This commit is contained in:
cesnimda
2026-03-22 14:00:49 +01:00
parent 10e10bb6a7
commit 47c72de283
4 changed files with 93 additions and 0 deletions
@@ -0,0 +1,22 @@
using System.Reflection;
using JobTrackerApi.Controllers;
using Xunit;
namespace JobTrackerApi.Tests;
public sealed class OwnershipGuardTests
{
[Fact]
public void Attachments_controller_has_owned_attachment_lookup_helper()
{
var method = typeof(AttachmentsController).GetMethod("FindOwnedAttachmentAsync", BindingFlags.NonPublic | BindingFlags.Instance);
Assert.NotNull(method);
}
[Fact]
public void Correspondence_controller_has_owned_message_lookup_helper()
{
var method = typeof(CorrespondenceController).GetMethod("FindOwnedMessageAsync", BindingFlags.NonPublic | BindingFlags.Instance);
Assert.NotNull(method);
}
}