Пример #1
0
        public void NoOptions_DoesNotGenerateHeader()
        {
            var builder = new CspRequireSriBuilder();

            var options = builder.BuildOptions();

            Assert.True(string.IsNullOrWhiteSpace(options.ToString()));
        }
Пример #2
0
        public void RequireStyle_GeneratesHeader()
        {
            var builder = new CspRequireSriBuilder();

            builder.ForStyles();

            var options = builder.BuildOptions();

            Assert.Equal("require-sri-for style", options.ToString());
        }