What
Multiple integration tests in tests/integration/credential_flow.rs have compilation errors and logical bugs that would cause unexpected panics.
Why
credential_client.get_credentials_for(learner) is called with 1 argument but the function requires 3: (learner, start, limit).
- Several tests (
test_public_verification, test_multiple_course_credentials, test_credential_metadata_uri, test_credential_has_issuance_timestamp) mint credentials without ever creating courses first. The credential-nft contract calls tracker.course_exists(course_id) which returns false, causing unexpected panics.
Scope
- Fix
get_credentials_for call to include start and limit arguments
- Add proper course creation and completion steps before each
mint_credential call
- Ensure all tests compile and pass
Technical Context
- File:
tests/integration/credential_flow.rs
- The credential-nft
mint function verifies course existence via the progress-tracker contract
- Tests need a full flow: create course → enroll → complete modules/quizzes → mint credential
Acceptance Criteria
What
Multiple integration tests in
tests/integration/credential_flow.rshave compilation errors and logical bugs that would cause unexpected panics.Why
credential_client.get_credentials_for(learner)is called with 1 argument but the function requires 3:(learner, start, limit).test_public_verification,test_multiple_course_credentials,test_credential_metadata_uri,test_credential_has_issuance_timestamp) mint credentials without ever creating courses first. The credential-nft contract callstracker.course_exists(course_id)which returns false, causing unexpected panics.Scope
get_credentials_forcall to includestartandlimitargumentsmint_credentialcallTechnical Context
tests/integration/credential_flow.rsmintfunction verifies course existence via the progress-tracker contractAcceptance Criteria
get_credentials_forcalls include correct argument countcargo test