backend: Extend issue and proposal access to admins
This commit is contained in:
1 parent
34f2d57bd3
commit
ea3de2e444
16 files changed
+184
-127
No files matched your search
@@ -17,6 +17,7 @@ public sealed class AttachmentTests(BackendFixture fixture) : IClassFixture<Back
|
||||
public async Task AttachmentsRespectFormatAndAccessAndFailedBatchesAreNotSaved()
|
||||
{
|
||||
using var anonymous = fixture.CreateClient();
|
||||
using var admin = fixture.CreateClient((await LoginAsync(anonymous, AdminEmail)).AccessToken);
|
||||
var authorUser = await fixture.RegisterAsync(anonymous);
|
||||
var otherUser = await fixture.RegisterAsync(anonymous);
|
||||
using var author = fixture.CreateClient((await LoginAsync(anonymous, authorUser.Email)).AccessToken);
|
||||
@@ -62,7 +63,7 @@ public sealed class AttachmentTests(BackendFixture fixture) : IClassFixture<Back
|
||||
AddFile(files, "fotka.jpg", [0xff, 0xd8, 0xff, 0xd9]);
|
||||
AddFile(files, "fotka.heic", [0, 0, 0, 20, .. "ftypmif1"u8, 0, 0, 0, 0, .. "heic"u8]);
|
||||
AddFile(files, "protokol.docx", Docx());
|
||||
var added = await ReadAsync<AttachmentDto[]>(author.PostAsync(path, files, Cancellation));
|
||||
var added = await ReadAsync<AttachmentDto[]>(admin.PostAsync(path, files, Cancellation));
|
||||
Assert.Equal(["application/pdf", "image/jpeg", "image/heic",
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"], added.Select(item => item.ContentType));
|
||||
|
||||
|
||||
Reference in new issue
Block a user