public async Task GetTableDetailWithoutValidAuth() { AppTests.LoadTestVariables(); var controller = new AdminInmuebles.Controllers.GenericFormsController() { AuthenticatedToken = _validJwtWithoutAdmin.ToJwt(true, true) }; var result = await controller.GetTableDetail(_testTableName) as UnauthorizedObjectResult; Assert.IsNotNull(result); }
public async Task GetTableDetail() { AppTests.LoadTestVariables(); var controller = new AdminInmuebles.Controllers.GenericFormsController() { AuthenticatedToken = _validJwt.ToJwt(true, true) }; var result = await controller.GetTableDetail(_testTableName) as OkObjectResult; Assert.IsNotNull(result); var value = result.Value as IEnumerable <AdminInmuebles.Models.Campo>; Assert.IsNotNull(value); }