Skip to content

Commit ee29c57

Browse files
Refactor the order of the assertions in account_spec (#352)
The reasoning for this is that if the first expect fails it will not send the other requests, which will pollute our account
1 parent 8074d29 commit ee29c57

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/provisioning/account_spec.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,11 @@ describe('account API - Provisioning', function () {
5252

5353
after('Destroy the sub account and user that was created', async () => {
5454
let delRes = await cloudinary.provisioning.account.delete_sub_account(CLOUD_ID);
55-
expect(delRes.message).to.eql('ok');
56-
57-
5855
let delUserRes = await cloudinary.provisioning.account.delete_user(USER_ID);
59-
expect(delUserRes.message).to.eql('ok');
60-
6156
let delGroupRes = await cloudinary.provisioning.account.delete_user_group(GROUP_ID);
57+
58+
expect(delRes.message).to.eql('ok');
59+
expect(delUserRes.message).to.eql('ok');
6260
expect(delGroupRes.ok).to.eql(true); // notice the different response structure
6361
});
6462

0 commit comments

Comments
 (0)