예제 #1
0
        public async Task DateCreationWorks()
        {
            const int eventId = 100;

            await firstContext.CreateUser(firstAuth);

            var groupId = await firstGroups.UpsertGroup(DefaultGroup());

            await firstDates.Create(groupId, eventId);

            var dates = await firstDates.List(groupId);

            Assert.Single(dates);
            Assert.Equal(groupId, dates[0].GroupId);
            Assert.Equal(eventId, dates[0].EventId);
        }
예제 #2
0
        public async Task DatesListingIsSuppressedForNonMember()
        {
            await firstContext.CreateUser(firstAuth);

            await secondContext.CreateUser(secondAuth, "Second");

            var groupId = await firstGroups.UpsertGroup(DefaultGroup());

            await firstDates.Create(groupId, 100);

            await firstDates.Create(groupId, 101);

            await firstDates.Create(groupId, 102);

            var dates = await secondDates.List(groupId);

            Assert.Empty(dates);
        }
 public Task <List <Date> > List([FromRoute] int?groupId)
 {
     return(datesService.List(groupId));
 }