Beispiel #1
0
        public async Task AddToCartAsync_Requires_Authentication()
        {
            var req = TestHelper.CreateHttpRequest("https://nzb.mtighe.dev/api/cart/add/123");

            _authService.Setup(s => s.IsAuthenticated(req)).ReturnsAsync(false);

            var result = await _function.AddToCartAsync(req, new MockCloudTable().Object, _cartTable.Object, _log.Object, "123");

            Assert.IsType <UnauthorizedResult>(result);
        }