From 380fce5e881a4ad0139036aca79ca67480075806 Mon Sep 17 00:00:00 2001 From: Jan Henning Thorsen Date: Thu, 17 Jun 2021 10:52:57 +0900 Subject: [PATCH] Add test for application/json;charset=UTF-8, jhthorsen/mojolicious-plugin-openapi#209 --- t/util.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/util.t b/t/util.t index 1609d1ea..e702ddb3 100644 --- a/t/util.t +++ b/t/util.t @@ -44,9 +44,10 @@ is_deeply( is negotiate_content_type([]), '', 'accepts nothing'; is negotiate_content_type(['multipart/form-data'], 'multipart/form-data; boundary=mgkBX'), 'multipart/form-data', 'form-data boundary'; +is negotiate_content_type(['application/json'], 'application/json;charset=UTF-8'), 'application/json', 'charset'; is negotiate_content_type(['application/json']), '', 'header missing'; is negotiate_content_type(['application/json', 'text/plain'], 'application/json'), 'application/json', 'exact match'; -is negotiate_content_type(['application/json', 'text/*'], 'text/plain'), 'text/*', 'closest accept'; +is negotiate_content_type(['application/json', 'text/*'], 'text/plain'), 'text/*', 'closest accept'; is negotiate_content_type( ['text/plain', 'application/xml'], 'text/html;text/plain;q=0.2,application/xml;q=0.9,*/*;q=0.8'