aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Server.Integration.Tests/Controllers/EncoderController.cs
diff options
context:
space:
mode:
authorClaus Vium <cvium@users.noreply.github.com>2021-06-09 10:23:29 +0200
committerGitHub <noreply@github.com>2021-06-09 10:23:29 +0200
commitd366fd3fd7b9db8ce5f481f9f1093adc1018b04e (patch)
tree0ba34f7139b2589379fca0127e2876799bd7dbae /tests/Jellyfin.Server.Integration.Tests/Controllers/EncoderController.cs
parentb986cb57b7a73236f5a3a1ed22ee8233bd0c75a8 (diff)
parent06401ffa0d8ae98fa42c750847f97c3c291b06ae (diff)
Merge pull request #6165 from Bond-009/tests4
Fix duplicate keys causing an exception
Diffstat (limited to 'tests/Jellyfin.Server.Integration.Tests/Controllers/EncoderController.cs')
-rw-r--r--tests/Jellyfin.Server.Integration.Tests/Controllers/EncoderController.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/EncoderController.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/EncoderController.cs
index 14f92f0d8..c8ce58047 100644
--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/EncoderController.cs
+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/EncoderController.cs
@@ -29,5 +29,25 @@ namespace Jellyfin.Api.Controllers
StatusCode = 200
};
}
+
+ /// <summary>
+ /// Tests the url decoding.
+ /// </summary>
+ /// <param name="params">Parameters to echo back in the response.</param>
+ /// <returns>An <see cref="OkResult"/>.</returns>
+ /// <response code="200">Information retrieved.</response>
+ [HttpGet("UrlArrayDecode")]
+ [ProducesResponseType(StatusCodes.Status200OK)]
+ public ContentResult TestUrlArrayDecoding([FromQuery] Dictionary<string, string[]>? @params = null)
+ {
+ return new ContentResult()
+ {
+ Content = (@params != null && @params.Count > 0)
+ ? string.Join("&", @params.Select(x => x.Key + "=" + string.Join(',', x.Value)))
+ : string.Empty,
+ ContentType = "text/plain; charset=utf-8",
+ StatusCode = 200
+ };
+ }
}
}