mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-26 19:15:09 +00:00
Fix OpenSearch XML content-type and add moz:SearchForm (#27364)
Fixes #27210
This commit is contained in:
1 parent
b13c52c11a
commit
f9242f3adb
2 files changed
+18
-2
No files matched your search
@@ -501,4 +501,19 @@ public class SearchTest {
|
||||
assertNotNull(jsonArray);
|
||||
return jsonArray;
|
||||
}
|
||||
|
||||
@Issue("27210")
|
||||
@Test
|
||||
void testOpenSearchXml() throws Exception {
|
||||
WebClient wc = j.createWebClient();
|
||||
Page page = wc.goTo("opensearch.xml", "application/opensearchdescription+xml");
|
||||
assertNotNull(page);
|
||||
j.assertGoodStatus(page);
|
||||
|
||||
assertEquals("application/opensearchdescription+xml", page.getWebResponse().getContentType());
|
||||
|
||||
String content = page.getWebResponse().getContentAsString();
|
||||
assertTrue(content.contains("xmlns:moz=\"http://www.mozilla.org/2006/browser/search/\""));
|
||||
assertTrue(content.contains("<moz:SearchForm>"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user