Skip to content

Commit b75aad6

Browse files
Restore unit test
1 parent ec9baf5 commit b75aad6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

library/src/test/scala/za/co/absa/springdocopenapiscala/OpenAPIScalaCustomizerSpec.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)