Skip to content

Commit

Permalink
fix existing tests by adding AllowEdit
Browse files Browse the repository at this point in the history
Signed-off-by: Timotheus Pokorra <[email protected]>
  • Loading branch information
tpokorra committed Jan 3, 2025
1 parent 44a5ea5 commit a393ac7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/Integration/Api/ApiV3Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ public function dataGetNewForm() {
'state' => 0,
'isAnonymous' => false,
'submitMultiple' => false,
'allowEdit' => false,
'showExpiration' => false,
// 'lastUpdated' => time() can not be checked exactly
'canSubmit' => true,
Expand Down Expand Up @@ -425,6 +426,7 @@ public function dataGetFullForm() {
'state' => 0,
'isAnonymous' => false,
'submitMultiple' => false,
'allowEdit' => false,
'showExpiration' => false,
'lastUpdated' => 123456789,
'canSubmit' => true,
Expand Down
4 changes: 4 additions & 0 deletions tests/Unit/Controller/ApiControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ public function dataTestCreateNewForm() {
'expires' => 0,
'isAnonymous' => false,
'submitMultiple' => false,
'allowEdit' => false,
'showExpiration' => false,
'lastUpdated' => 123456789,
'submissionMessage' => null,
Expand Down Expand Up @@ -503,6 +504,7 @@ public function dataCloneForm() {
'expires' => 0,
'isAnonymous' => false,
'submitMultiple' => false,
'allowEdit' => false,
'showExpiration' => false
],
'new' => [
Expand All @@ -518,6 +520,7 @@ public function dataCloneForm() {
'expires' => 0,
'isAnonymous' => false,
'submitMultiple' => false,
'allowEdit' => false,
'showExpiration' => false
]
]
Expand Down Expand Up @@ -969,6 +972,7 @@ public function dataTestDeletePermission() {
'expires' => 0,
'isAnonymous' => false,
'submitMultiple' => false,
'allowEdit' => false,
'showExpiration' => false
],
]
Expand Down
4 changes: 4 additions & 0 deletions tests/Unit/Service/FormsServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -786,24 +786,28 @@ public function dataCanSubmit() {
'allowFormOwner' => [
'ownerId' => 'currentUser',
'submitMultiple' => false,
'allowEdit' => false,
'hasFormSubmissionsByUser' => true,
'expected' => true
],
'submitMultipleGood' => [
'ownerId' => 'someUser',
'submitMultiple' => false,
'allowEdit' => false,
'hasFormSubmissionsByUser' => false,
'expected' => true
],
'submitMultipleNotGood' => [
'ownerId' => 'someUser',
'submitMultiple' => false,
'allowEdit' => false,
'hasFormSubmissionsByUser' => true,
'expected' => false
],
'submitMultiple' => [
'ownerId' => 'someUser',
'submitMultiple' => true,
'allowEdit' => false,
'hasFormSubmissionsByUser' => true,
'expected' => true
]
Expand Down

0 comments on commit a393ac7

Please sign in to comment.