示例#1
0
        public async void GetLists_Should_ReturnForbidden_When_UserIsNotLogged()
        {
            // Arrange
            var client = new ListNestAppBuilder(_factory)
                         .CreateSampleDataset()
                         .CreateClient();

            // Act
            var response = await client.DoGetAsync <PagedVmResult <ListVmResult> >(baseUrl);

            // Assert
            PotatoAssert.EqualStatusCode(System.Net.HttpStatusCode.Unauthorized, response);
        }
示例#2
0
        public async void GetLists_Should_ReturnEmptyList_When_UserIsNotAssignedToAnyList()
        {
            // Add user
            // GetLists
            // Check

            var client = new ListNestAppBuilder(_factory)
                         .CreateSampleDataset()
                         .CreateClient();

            var token = await client.GetUserTokenAsync(DbValues.Users[0].Email, DbValues.DefaultPassword);

            var response = await client.DoGetAsync <PagedVmResult <ListVmResult> >(baseUrl, token);
        }