Esempio n. 1
0
        public async Task GetTablesWithoutValidAuth()
        {
            AppTests.LoadTestVariables();
            var controller = new AdminInmuebles.Controllers.GenericFormsController()
            {
                AuthenticatedToken = _validJwtWithoutAdmin.ToJwt(true, true)
            };
            var result = await controller.GetTypesTables() as UnauthorizedObjectResult;

            Assert.IsNotNull(result);
        }
Esempio n. 2
0
        public async Task GetTables()
        {
            AppTests.LoadTestVariables();
            var controller = new AdminInmuebles.Controllers.GenericFormsController()
            {
                AuthenticatedToken = _validJwt.ToJwt(true, true)
            };
            var result = await controller.GetTypesTables() as OkObjectResult;

            Assert.IsNotNull(result);
            var value = result.Value as IEnumerable <AdminInmuebles.Models.Tabla>;

            Assert.IsNotNull(value);
        }