Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenreup committed Jan 26, 2024
1 parent 516ebd5 commit 2aca539
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ class QuestionnaireActivityTest : ActivityRobolectricTest() {
val questionnaireViewModel2 = spyk(questionnaireViewModel)
val questionnaire =
Questionnaire().apply {
id = "test"
url = "Questionnaire/test"
addItem().apply {
linkId = "page-1"
type = Questionnaire.QuestionnaireItemType.GROUP
Expand Down Expand Up @@ -276,6 +278,7 @@ class QuestionnaireActivityTest : ActivityRobolectricTest() {
}
val questionnaireResponse =
questionnaireViewModel2.generateQuestionnaireResponse(questionnaire, populationIntent)
questionnaireResponse.questionnaire = "${questionnaire.resourceType}/${questionnaire.logicalId}"
assertFailsWith<IllegalArgumentException>(
message = "Multiple answers for non-repeat questionnaire item phone-value-1"
) { checkQuestionnaireResponse(questionnaire, questionnaireResponse) }
Expand All @@ -286,6 +289,8 @@ class QuestionnaireActivityTest : ActivityRobolectricTest() {
val questionnaireViewModel2 = spyk(questionnaireViewModel)
val questionnaire =
Questionnaire().apply {
id = "test"
url = "Questionnaire/test"
addItem().apply {
linkId = "page-1"
type = Questionnaire.QuestionnaireItemType.GROUP
Expand Down

0 comments on commit 2aca539

Please sign in to comment.