File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/test/scala/de/upb/cs/swt/delphi/instanceregistry/connection Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -651,18 +651,18 @@ class ServerTest
651651 /** Minimal tests for docker operations **/
652652
653653 " fail to deploy if component type is invalid" in {
654- Post (" /instances/deploy? ComponentType= Car" ) ~> addAuthorization(" Admin" ) ~> server.routes ~> check {
654+ Post (" /instances/deploy" , HttpEntity ( ContentTypes .`application/json`, """ {" ComponentType": " Car"} """ ) ) ~> addAuthorization(" Admin" ) ~> server.routes ~> check {
655655 status shouldEqual StatusCodes .BAD_REQUEST
656656 responseAs[String ].toLowerCase should include(" could not deserialize" )
657657 }
658658
659659 // Wrong user type
660- Post (" /instances/deploy? ComponentType= Crawler" ) ~> addAuthorization(" User" ) ~> server.routes ~> check {
660+ Post (" /instances/deploy" , HttpEntity ( ContentTypes .`application/json`, """ {" ComponentType": " Crawler"} """ ) ) ~> addAuthorization(" User" ) ~> server.routes ~> check {
661661 rejection.isInstanceOf [AuthenticationFailedRejection ] shouldBe true
662662 }
663663
664664 // No authorization
665- Post (" /instances/deploy? ComponentType= Crawler" ) ~> server.routes ~> check {
665+ Post (" /instances/deploy" , HttpEntity ( ContentTypes .`application/json`, """ {" ComponentType": " Crawler"} """ ) ) ~> server.routes ~> check {
666666 rejection.isInstanceOf [AuthenticationFailedRejection ] shouldBe true
667667 }
668668 }
You can’t perform that action at this time.
0 commit comments