Fix: Remove invalid metadata images

This commit is contained in:
Keivan Beigi 2015-01-02 10:57:51 -08:00
parent b907243bc0
commit c8993db2ad
21 changed files with 332 additions and 132 deletions

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using FluentAssertions;
using NUnit.Framework;
@ -96,6 +97,20 @@ namespace NzbDrone.Common.Test.Http
response.Resource.Headers[header].ToString().Should().Be(value);
}
[Test]
public void should_not_download_file_with_error()
{
var file = GetTempFilePath();
Assert.Throws<WebException>(() => Subject.DownloadFile("http://download.sonarr.tv/wrongpath", file));
File.Exists(file).Should().BeFalse();
ExceptionVerification.ExpectedWarns(1);
}
}
public class HttpBinResource