This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 62207971596 Added unit test
62207971596 is described below
commit 62207971596bc4b186c4ac12a73cad2a15afc84f
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Nov 23 19:05:40 2023 +0100
Added unit test
---
.../test/java/org/apache/camel/language/jq/JqFilterTest.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git
a/components/camel-jq/src/test/java/org/apache/camel/language/jq/JqFilterTest.java
b/components/camel-jq/src/test/java/org/apache/camel/language/jq/JqFilterTest.java
index 2e0b4c9acde..a99f4b892f1 100644
---
a/components/camel-jq/src/test/java/org/apache/camel/language/jq/JqFilterTest.java
+++
b/components/camel-jq/src/test/java/org/apache/camel/language/jq/JqFilterTest.java
@@ -42,4 +42,14 @@ public class JqFilterTest extends JqTestSupport {
MockEndpoint.assertIsSatisfied(context);
}
+
+ @Test
+ public void testFilterStringJSon() throws Exception {
+ getMockEndpoint("mock:result").expectedBodiesReceived("{\"foo\":
\"bar\"}");
+
+ template.sendBody("direct:start", "{\"foo\": \"baz\"}");
+ template.sendBody("direct:start", "{\"foo\": \"bar\"}");
+
+ MockEndpoint.assertIsSatisfied(context);
+ }
}