Skip to content

Commit 9d0f7df

Browse files
authored
fix API integration test
Signed-off-by: GitHub <[email protected]>
1 parent 46af26b commit 9d0f7df

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/Integration/Api/ApiV3Test.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,6 +1362,12 @@ public function testInsertSubmission(array $submissionsExpected) {
13621362
$this->assertEquals($data['submissions'][0]['id'], $answer['submissionId']);
13631363
unset($data['submissions'][0]['answers'][$aIndex]['id']);
13641364
unset($data['submissions'][0]['answers'][$aIndex]['submissionId']);
1365+
1366+
if (isset($answer['fileId'])) {
1367+
$this->assertIsNumeric($answer['fileId'], 'fileId should be numeric.');
1368+
$this->assertGreaterThan(0, $answer['fileId'], 'fileId should be greater than 0.');
1369+
unset($data['submissions'][0]['answers'][$aIndex]['fileId']);
1370+
}
13651371
}
13661372
unset($data['submissions'][0]['id']);
13671373
// Check general behaviour of timestamp (Insert in the last 10 seconds)
@@ -1386,7 +1392,6 @@ public function testInsertSubmission(array $submissionsExpected) {
13861392
[
13871393
'questionId' => $this->testForms[0]['questions'][2]['id'],
13881394
'text' => 'test.txt',
1389-
'fileId' => 28,
13901395
],
13911396
]
13921397
], $data['submissions'][0]);

0 commit comments

Comments
 (0)