public async Task Controller_Delete() { var smanager = new SymbolManager(Context, new Config() { MaxSymsPerPage = 15 }); var controller = new ExampleController(User, new ExampleModule(Context), smanager); var sym = await PostTestSymbol(new Symbols.SymbolController(smanager, User)); await PostTestExample(sym); await controller.DeleteAsync(1); Assert.AreEqual(0, Context.Examples.Count()); User.SetPermissions(new string[] { }); Assert.ThrowsAsync <Shared.Exceptions.InsuficientPermission>(() => controller.DeleteAsync(1)); }