What
The test test_learn_token_zero_score_error_message (line 360-381) expects #[should_panic(expected = "score must be greater than 0")] but calls pt_client.submit_quiz_score(...) with score 0. However, submit_quiz_score in progress-tracker accepts score 0 — it does NOT validate score > 0. The "score must be greater than 0" check exists only in learn-token's claim_reward (line 653-655). The test never calls claim_reward, so the expected panic never occurs.
Why
The test doesn't verify what its name claims. It passes for the wrong reason (or doesn't compile/run). There is no test that actually verifies claim_reward's behavior with score 0.
Scope
- Fix the test to actually test
claim_reward with a score of 0, which requires:
- Setting up a progress-tracker with a quiz submitted at score 0
- Calling
claim_reward which should panic with "score must be greater than 0"
- OR rename the test to accurately reflect what it tests
Acceptance Criteria
- The test actually exercises the code path it claims to test
- The test name matches the behavior being tested
Technical Context
tests/unit/error_message_tests.rs:360-381 — the test
contracts/progress-tracker/src/lib.rs:747-752 — submit_quiz_score accepts score 0
contracts/learn-token/src/lib.rs:653-655 — claim_reward rejects score 0
What
The test
test_learn_token_zero_score_error_message(line 360-381) expects#[should_panic(expected = "score must be greater than 0")]but callspt_client.submit_quiz_score(...)with score 0. However,submit_quiz_scorein progress-tracker accepts score 0 — it does NOT validatescore > 0. The "score must be greater than 0" check exists only in learn-token'sclaim_reward(line 653-655). The test never callsclaim_reward, so the expected panic never occurs.Why
The test doesn't verify what its name claims. It passes for the wrong reason (or doesn't compile/run). There is no test that actually verifies
claim_reward's behavior with score 0.Scope
claim_rewardwith a score of 0, which requires:claim_rewardwhich should panic with "score must be greater than 0"Acceptance Criteria
Technical Context
tests/unit/error_message_tests.rs:360-381— the testcontracts/progress-tracker/src/lib.rs:747-752— submit_quiz_score accepts score 0contracts/learn-token/src/lib.rs:653-655— claim_reward rejects score 0