SEBWIN-471: Fixed unit test to ensure reconfiguration of secure session is not permitted without reconfiguring URL.

This commit is contained in:
Damian Büchel 2021-04-23 15:34:12 +02:00
parent a33c7c0ff9
commit c4a358e70c

View file

@ -626,7 +626,7 @@ namespace SafeExamBrowser.Client.UnitTests
} }
[TestMethod] [TestMethod]
public void Reconfiguration_MustAllowWithQuitPasswordAndNoUrl() public void Reconfiguration_MustNotAllowWithQuitPasswordAndNoUrl()
{ {
var args = new DownloadEventArgs(); var args = new DownloadEventArgs();
@ -637,10 +637,9 @@ namespace SafeExamBrowser.Client.UnitTests
sut.TryStart(); sut.TryStart();
browser.Raise(b => b.ConfigurationDownloadRequested += null, "filepath.seb", args); browser.Raise(b => b.ConfigurationDownloadRequested += null, "filepath.seb", args);
args.Callback(true, string.Empty);
runtimeProxy.Verify(r => r.RequestReconfiguration(It.IsAny<string>(), It.IsAny<string>()), Times.Once); runtimeProxy.Verify(r => r.RequestReconfiguration(It.IsAny<string>(), It.IsAny<string>()), Times.Never);
Assert.IsTrue(args.AllowDownload); Assert.IsFalse(args.AllowDownload);
} }
[TestMethod] [TestMethod]