mirror of
https://github.com/Radarr/Radarr
synced 2024-12-25 01:11:43 +00:00
Fixed Nzbget tests
This commit is contained in:
parent
54c29ada12
commit
0315385f98
2 changed files with 5 additions and 5 deletions
|
@ -33,7 +33,7 @@ public void Setup()
|
|||
private void WithFailResponse()
|
||||
{
|
||||
Mocker.GetMock<HttpProvider>()
|
||||
.Setup(s => s.PostCommand("http://192.168.5.55:6789/jsonrpc", "nzbget", "pass", It.IsAny<String>()))
|
||||
.Setup(s => s.PostCommand("192.168.5.55:6789", "nzbget", "pass", It.IsAny<String>()))
|
||||
.Returns(File.ReadAllText(@".\Files\Nzbget\JsonError.txt"));
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ public void should_add_item_to_queue()
|
|||
const string title = "30 Rock - S01E01 - Pilot [HDTV-720p]";
|
||||
|
||||
Mocker.GetMock<HttpProvider>()
|
||||
.Setup(s => s.PostCommand("http://192.168.5.55:6789/jsonrpc", "nzbget", "pass",
|
||||
.Setup(s => s.PostCommand("192.168.5.55:6789", "nzbget", "pass",
|
||||
It.Is<String>(c => c.Equals("{\"method\":\"appendurl\",\"params\":[\"30 Rock - S01E01 - Pilot [HDTV-720p]\",\"TV\",0,false,\"http://www.nzbdrone.com\"]}"))))
|
||||
.Returns("{\"version\": \"1.1\",\"result\": true}");
|
||||
|
||||
|
|
|
@ -32,21 +32,21 @@ public void Setup()
|
|||
private void WithFullQueue()
|
||||
{
|
||||
Mocker.GetMock<HttpProvider>()
|
||||
.Setup(s => s.PostCommand("http://192.168.5.55:6789/jsonrpc", "nzbget", "pass", It.IsAny<String>()))
|
||||
.Setup(s => s.PostCommand("192.168.5.55:6789", "nzbget", "pass", It.IsAny<String>()))
|
||||
.Returns(File.ReadAllText(@".\Files\Nzbget\Queue.txt"));
|
||||
}
|
||||
|
||||
private void WithEmptyQueue()
|
||||
{
|
||||
Mocker.GetMock<HttpProvider>()
|
||||
.Setup(s => s.PostCommand("http://192.168.5.55:6789/jsonrpc", "nzbget", "pass", It.IsAny<String>()))
|
||||
.Setup(s => s.PostCommand("192.168.5.55:6789", "nzbget", "pass", It.IsAny<String>()))
|
||||
.Returns(File.ReadAllText(@".\Files\Nzbget\Queue_empty.txt"));
|
||||
}
|
||||
|
||||
private void WithFailResponse()
|
||||
{
|
||||
Mocker.GetMock<HttpProvider>()
|
||||
.Setup(s => s.PostCommand("http://192.168.5.55:6789/jsonrpc", "nzbget", "pass", It.IsAny<String>()))
|
||||
.Setup(s => s.PostCommand("192.168.5.55:6789", "nzbget", "pass", It.IsAny<String>()))
|
||||
.Returns(File.ReadAllText(@".\Files\Nzbget\JsonError.txt"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue