From a394041c8abcbe4d24e98805a303cc1c5982c14b Mon Sep 17 00:00:00 2001 From: To-om Date: Wed, 2 Sep 2020 12:12:09 +0200 Subject: [PATCH] #1499 Fix test --- .../controllers/v0/AlertCtrlTest.scala | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/thehive/test/org/thp/thehive/controllers/v0/AlertCtrlTest.scala b/thehive/test/org/thp/thehive/controllers/v0/AlertCtrlTest.scala index 6e37b1896c..2a27b5b513 100644 --- a/thehive/test/org/thp/thehive/controllers/v0/AlertCtrlTest.scala +++ b/thehive/test/org/thp/thehive/controllers/v0/AlertCtrlTest.scala @@ -154,7 +154,20 @@ class AlertCtrlTest extends PlaySpecification with TestAppBuilder { ) TestAlert(resultAlertOutput) shouldEqual expected - resultAlertOutput.artifacts must beEmpty + resultAlertOutput + .artifacts + .map(o => TestObservable(o)) must contain( + TestObservable( + "domain", + Some("h.fr"), + None, + 1, + Set("testNamespace:testPredicate=\"hello\""), + ioc = true, + sighted = true, + Some("observable from alert") + ) + ) } "update an alert" in testApp { app => @@ -261,8 +274,8 @@ class AlertCtrlTest extends PlaySpecification with TestAppBuilder { summary = None, owner = Some("certuser@thehive.local"), customFields = Json.obj( - "boolean1" -> Json.obj("boolean" -> JsNull, "order" -> JsNull), - "string1" -> Json.obj("string" -> "string1 custom field", "order" -> JsNull) + "boolean1" -> Json.obj("boolean" -> JsNull, "order" -> JsNull), + "string1" -> Json.obj("string" -> "string1 custom field", "order" -> JsNull) ), stats = Json.obj() )