Skip to content

Commit ed7d6fd

Browse files
committed
Fix test: update challenge_user without setting completed
The completion validation now blocks completed=true without a submission. Updated test to only set joined_discord, which doesn't require a submission.
1 parent 0f133b5 commit ed7d6fd

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

tests/Feature/ChallengeSubmissionTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ public function it_can_update_challenge_user_data(): void
164164
'Authorization' => "Bearer $token",
165165
]);
166166

167+
// Update non-completion fields (joined_discord)
167168
$response = $this->putJson("/api/challenges/{$challenge->slug}", [
168-
'completed' => true,
169169
'joined_discord' => true,
170170
], [
171171
'Authorization' => "Bearer $token",
@@ -177,7 +177,6 @@ public function it_can_update_challenge_user_data(): void
177177
$this->assertDatabaseHas('challenge_user', [
178178
'user_id' => $user->id,
179179
'challenge_id' => $challenge->id,
180-
'completed' => true,
181180
'joined_discord' => true,
182181
]);
183182
}

0 commit comments

Comments
 (0)