Skip to content

Fix incorrect supportsUserOperations expectation for server-to-server credentials. #121

@leogdion

Description

@leogdion

⚠️ Potential issue | 🟠 Major

Fix incorrect supportsUserOperations expectation for server-to-server credentials.

TokenCredentials.supportsUserOperations returns false for .serverToServer (see Sources/MistKit/Authentication/TokenCredentials.swift, Lines 36-48), so this assertion will always fail. Update the expectation to reflect the actual behavior.

Based on learnings

🤖 Prompt for AI Agents
In
Tests/MistKitTests/Authentication/Protocol/TokenManagerTokenCredentialsTests.swift
around lines 75 to 83, the test incorrectly expects server-to-server credentials
to support user operations; TokenCredentials.supportsUserOperations returns
false for .serverToServer. Update the test expectation to assert
serverCredentials.supportsUserOperations == false (instead of true) so the test
matches the implementation.

Originally posted by @coderabbitai[bot] in #105 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions