Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }