﻿// ReSharper disable InconsistentNaming

using Microsoft.Owin.Testing;
using NUnit.Framework;
using OnDotNet.Owin.Shield.IENoOpen;

namespace OnDotNet.Owin.Shield.Tests.IENoOpen
{
    [TestFixture]
    public class IENoOpenTests
    {
        [Test]
        public async void VerifyIENoOpen()
        {
            using (var server = TestServer.Create(app =>
            {
                app.IENoOpen();
            }))
            {
                var response = await server.HttpClient.GetAsync("/");
                var value = string.Join("", response.Headers.GetValues("X-Download-Options"));
                Assert.AreEqual("noopen", value);
            }
        }
    }
}
