- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
[Test]
public void UserHasNoPermissionToDeleteTransactionWithEditPermission()
{
var user = CreatetestUser("test")
.WithPermissions()
.Allow("Transaction/Edit").Do();
TestCurrentUser = user;
var trn = CreateTestTransaction(120, typeof(CreditCardPayment));
try
{
// Who cares about delete, we never do it.
// I need this test passed just NOW.
// trn.AsIObject().Delete();
// Assert.Fail("Exception expected");
}
catch (PermissionException ex)
{
Assert.IsTrue(true, "Cool we got an exception");
}
catch (Exception generic)
{
Assert.Fail("PermissionException expected.");
}
}