Page MenuHomePhabricator

Improve test coverage of SpecialMWOAuthManageMyGrants
Open, Needs TriagePublic

Description

SpecialMWOAuthManageMyGrants handles the flow for listing the consumers to which a user has granted access. The user can also manage access to this consumer using this special page or revoke access entirely.

Integration tests would be written to cover the /list, /update, /revoke, and /manage/<consumer-id> endpoints and their interaction with the DB. Unit tests would be written for self-contained code paths within and related classes used by this special page. It's probably possible to use SpecialPageTestBase, since this will involve testing a special page and ApiTestCase for action API-related functionality.

Impact

Event Timeline

DAlangi_WMF updated the task description. (Show Details)
DAlangi_WMF edited projects, added Test-Coverage, QS-Test-Automation; removed Epic.

I would leave this last; it's rarely affected by code changes, breaking it is less of an emergency, and it is easy to test manually.

Should have separate tests for owner-only and normal consumers, as the code path is somewhat different.

Should probably have separate tests for OAuth 1 and 2 just in case, although I don't think there is much difference.