Beispiel #1
0
        public async Task allow_to_view_grades_if_the_policie_is_satisfied()
        {
            var application = await fixture.GivenAnApplication();

            var subject = await fixture.GivenAnSubject(Subs.Teacher);

            await fixture.GivenARole(Roles.Teacher, application, subject);

            await fixture.GivenAPolicy(application, "abac-policy", AbacPolicies.Substitute);

            foreach (var server in servers)
            {
                var response = await server
                               .CreateRequest(Api.School.GetAbacPolicy)
                               .WithIdentity(new Fixture().Sub(subject.Sub))
                               .GetAsync();

                response.StatusCode.Should().Be(StatusCodes.Status200OK);
            }
        }