Fixing WebDownloaderTests

This commit is contained in:
Benedek Farkas 2024-05-03 15:33:07 +02:00
parent fdbb06ba8d
commit 0d9fccb624

View File

@ -1,4 +1,5 @@
using System.Net;
using System;
using System.Net;
using NUnit.Framework;
using Orchard.Warmup.Services;
@ -20,7 +21,7 @@ namespace Orchard.Tests.Modules.Warmup {
[Test]
public void StatusCodeShouldBe404ForUnexistingResources() {
var download = _webDownloader.Download("http://orchardproject.net/yepyep");
var download = _webDownloader.Download("https://orchardcore.net/" + Guid.NewGuid());
Assert.That(download, Is.Not.Null);
Assert.That(download.StatusCode, Is.EqualTo(HttpStatusCode.NotFound));
Assert.That(download.Content, Is.Null);
@ -28,7 +29,7 @@ namespace Orchard.Tests.Modules.Warmup {
[Test]
public void StatusCodeShouldBe200ForValidRequests() {
var download = _webDownloader.Download("http://orchardproject.net/");
var download = _webDownloader.Download("https://orchardcore.net/");
Assert.That(download, Is.Not.Null);
Assert.That(download.StatusCode, Is.EqualTo(HttpStatusCode.OK));
Assert.That(download.Content, Is.Not.Empty);