mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-08-06 17:36:53 +01:00
Park testing knowledge files for later review
This commit is contained in:
parent
822cae1b27
commit
c4ecab140b
6 changed files with 167 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
|||
codeunit 50102 "Customer Permission Tests"
|
||||
{
|
||||
Subtype = Test;
|
||||
TestPermissions = Restrictive;
|
||||
var
|
||||
Assert: Codeunit Assert;
|
||||
|
||||
[Test]
|
||||
procedure CustomerReadFailsWithoutPermission()
|
||||
var
|
||||
Customer: Record Customer;
|
||||
begin
|
||||
// Restrictive: test runner assigns no permission sets to the test user.
|
||||
asserterror Customer.FindFirst();
|
||||
Assert.ExpectedError('You do not have the following permissions');
|
||||
end;
|
||||
|
||||
[Test]
|
||||
[TestPermissions(TestPermissions::Disabled)]
|
||||
procedure AdminCanReadAllCustomers()
|
||||
var
|
||||
Customer: Record Customer;
|
||||
begin
|
||||
// Disabled overrides codeunit-level Restrictive for this test only.
|
||||
// Use for paths that legitimately require elevated access.
|
||||
Customer.FindFirst();
|
||||
end;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue