Ghost/ghost/admin/tests/unit/models
naz 238632402c 🐛 Fixed host limit error when resending a pending invite (#1881)
refs https://github.com/TryGhost/Team/issues/587
refs e30b9735fa

- It was not possible to invite a new Contributor to a site that has reached its limit
- This fix divides the resend invite action into two separate steps: 1. Deleting existing invite 2. Creating a new one for the same data
- It was hitting the limit because the permissions were correctly checking for "add" action being executed when the limit of invites/staff users was already used up. By removing existing invite we mimic the behavior the server would do for us anyway (2111992dd4/core/server/services/invites/invites.js (L18-L22))

Co-authored-by: Rish <zrishabhgarg@gmail.com>
2021-04-06 15:10:03 +12:00
..
invite-test.js 🐛 Fixed host limit error when resending a pending invite (#1881) 2021-04-06 15:10:03 +12:00
member-test.js Added member "add" screen (#1411) 2019-11-28 18:30:21 +07:00
navigation-item-test.js Refactored deprecated usage of setupTest* methods 2019-05-13 15:31:32 +01:00
post-test.js Refactored deprecated usage of setupTest* methods 2019-05-13 15:31:32 +01:00
role-test.js Refactored deprecated usage of setupTest* methods 2019-05-13 15:31:32 +01:00
setting-test.js Refactored deprecated usage of setupTest* methods 2019-05-13 15:31:32 +01:00
tag-test.js Refactored deprecated usage of setupTest* methods 2019-05-13 15:31:32 +01:00
user-test.js Refactored deprecated usage of setupTest* methods 2019-05-13 15:31:32 +01:00