-
Notifications
You must be signed in to change notification settings - Fork 640
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1473 fixed case creation assignee & tests
- Loading branch information
Showing
4 changed files
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,7 +118,8 @@ class CaseCtrlTest extends PlaySpecification with TestAppBuilder { | |
"flag":false, | ||
"status":"Waiting" | ||
} | ||
] | ||
], | ||
"user":"[email protected]" | ||
}""" | ||
) | ||
.as[JsObject] | ||
|
@@ -140,7 +141,7 @@ class CaseCtrlTest extends PlaySpecification with TestAppBuilder { | |
pap = 2, | ||
status = "Open", | ||
tags = Set.empty, | ||
owner = Some("certuser@thehive.local"), | ||
owner = Some("certro@thehive.local"), | ||
stats = JsObject.empty | ||
) | ||
) | ||
|
@@ -155,7 +156,7 @@ class CaseCtrlTest extends PlaySpecification with TestAppBuilder { | |
val assignee = app[Database].roTransaction(implicit graph => app[CaseSrv].get(EntityIdOrName(outputCase._id)).assignee.getOrFail("Case")) | ||
|
||
assignee must beSuccessfulTry | ||
assignee.get.login shouldEqual "certuser@thehive.local" | ||
assignee.get.login shouldEqual "certro@thehive.local" | ||
} | ||
|
||
"try to get a case" in testApp { app => | ||
|
@@ -380,7 +381,7 @@ class CaseCtrlTest extends PlaySpecification with TestAppBuilder { | |
// Merge result | ||
TestCase(outputCase) must equalTo( | ||
TestCase( | ||
caseId = 26, | ||
caseId = 27, | ||
title = "case#21 / case#22", | ||
description = "description of case #21\n\ndescription of case #22", | ||
severity = 3, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,8 @@ class CaseCtrlTest extends PlaySpecification with TestAppBuilder { | |
tags = Set("tag1", "tag2"), | ||
flag = Some(false), | ||
tlp = Some(1), | ||
pap = Some(3) | ||
pap = Some(3), | ||
user = Some("[email protected]") | ||
) | ||
) | ||
) | ||
|
@@ -77,7 +78,7 @@ class CaseCtrlTest extends PlaySpecification with TestAppBuilder { | |
pap = 3, | ||
status = "Open", | ||
summary = None, | ||
user = Some("certuser@thehive.local"), | ||
user = Some("certro@thehive.local"), | ||
customFields = Seq.empty | ||
) | ||
|
||
|