Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.10.x' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
BenedekFarkas committed May 3, 2024
2 parents 62038ed + 0d9fccb commit 86bcf41
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Orchard.Tests.Modules/Warmup/WebDownloaderTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Net;
using System;
using System.Net;
using NUnit.Framework;
using Orchard.Warmup.Services;

Expand All @@ -20,15 +21,15 @@ public void ShouldReturnNullWhenUrlIsInvalid() {

[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);
}

[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);
Expand Down

0 comments on commit 86bcf41

Please sign in to comment.