no message
This commit is contained in:
parent
b037809c0e
commit
147b1db4a5
2 changed files with 19 additions and 7 deletions
|
|
@ -22,7 +22,7 @@ public class QBittorrentControllerTest
|
|||
_qBittorrentMock.Object,
|
||||
new Mock<IHttpClientFactory>().Object);
|
||||
|
||||
_controller.ControllerContext = new ControllerContext
|
||||
_controller.ControllerContext = new()
|
||||
{
|
||||
HttpContext = new DefaultHttpContext()
|
||||
};
|
||||
|
|
@ -43,7 +43,7 @@ public class QBittorrentControllerTest
|
|||
});
|
||||
|
||||
// Act
|
||||
var result = await _controller.TorrentsInfo(new QBTorrentsInfoRequest
|
||||
var result = await _controller.TorrentsInfo(new()
|
||||
{
|
||||
Filter = "all",
|
||||
Hashes = "hash1"
|
||||
|
|
@ -77,7 +77,7 @@ public class QBittorrentControllerTest
|
|||
});
|
||||
|
||||
// Act
|
||||
var result = await _controller.TorrentsInfo(new QBTorrentsInfoRequest
|
||||
var result = await _controller.TorrentsInfo(new()
|
||||
{
|
||||
Filter = "completed"
|
||||
});
|
||||
|
|
|
|||
|
|
@ -43,8 +43,14 @@ public class SabnzbdHandlerTest
|
|||
{
|
||||
// Arrange
|
||||
Settings.Get.General.AuthenticationType = AuthenticationType.UserNamePassword;
|
||||
var httpContext = new DefaultHttpContext();
|
||||
httpContext.Request.QueryString = new("?ma_username=user&ma_password=pass");
|
||||
var httpContext = new DefaultHttpContext
|
||||
{
|
||||
Request =
|
||||
{
|
||||
QueryString = new("?ma_username=user&ma_password=pass")
|
||||
}
|
||||
};
|
||||
|
||||
_httpContextAccessorMock.Setup(a => a.HttpContext).Returns(httpContext);
|
||||
|
||||
var context = CreateContext(httpContext);
|
||||
|
|
@ -81,8 +87,14 @@ public class SabnzbdHandlerTest
|
|||
{
|
||||
// Arrange
|
||||
Settings.Get.General.AuthenticationType = AuthenticationType.UserNamePassword;
|
||||
var httpContext = new DefaultHttpContext();
|
||||
httpContext.Request.QueryString = new("?ma_username=user&ma_password=wrong");
|
||||
var httpContext = new DefaultHttpContext
|
||||
{
|
||||
Request =
|
||||
{
|
||||
QueryString = new("?ma_username=user&ma_password=wrong")
|
||||
}
|
||||
};
|
||||
|
||||
_httpContextAccessorMock.Setup(a => a.HttpContext).Returns(httpContext);
|
||||
|
||||
var context = CreateContext(httpContext);
|
||||
|
|
|
|||
Loading…
Reference in a new issue