Skip to content

Commit

Permalink
#1499 Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Sep 2, 2020
1 parent 8f635c8 commit 1c02b59
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions thehive/test/org/thp/thehive/controllers/v0/AlertCtrlTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 =>
Expand Down Expand Up @@ -261,8 +274,8 @@ class AlertCtrlTest extends PlaySpecification with TestAppBuilder {
summary = None,
owner = Some("[email protected]"),
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()
)
Expand Down

0 comments on commit 1c02b59

Please sign in to comment.