File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
library/src/test/scala/za/co/absa/springdocopenapiscala Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,17 @@ class OpenAPIScalaCustomizerSpec extends AnyFlatSpec {
5656
5757 behavior of " customise"
5858
59+ it should " set `components` of its argument OpenAPI object to one injected via DI to the class" in {
60+ val components = new Components ().addSchemas(" a" , new Schema )
61+ val openAPIScalaCustomizer = new OpenAPIScalaCustomizer (components)
62+
63+ val openAPI = initializeOpenAPI
64+
65+ openAPIScalaCustomizer.customise(openAPI)
66+
67+ assert(openAPI.getComponents === components)
68+ }
69+
5970 it should " convert all responses returning Unit (BoxedUnit reference) to empty response" in {
6071 val components = new Components ()
6172 val openAPIScalaCustomizer = new OpenAPIScalaCustomizer (components)
You can’t perform that action at this time.
0 commit comments