Skip to content

Commit

Permalink
test: add missing returns/awaits
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusbsilva137 committed May 10, 2024
1 parent a38a680 commit 45c063f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions apps/meteor/tests/end-to-end/api/08-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,14 @@ describe('[Settings]', function () {

it('should fail returning a setting if user does NOT have the view-privileged-setting permission (GET)', async () => {
await updatePermission('view-privileged-setting', []);
request
return request
.get(api('settings/Site_Url'))
.set(credentials)
.expect('Content-Type', 'application/json')
.expect(200)
.expect(403)
.expect((res) => {
expect(res.body).to.have.property('success', true);
expect(res.body).to.have.property('_id', 'Site_Url');
expect(res.body).to.have.property('value');
expect(res.body).to.have.property('success', false);
expect(res.body).to.have.property('error', 'User does not have the permissions required for this action [error-unauthorized]');
});
});

Expand All @@ -110,7 +109,7 @@ describe('[Settings]', function () {

it('should fail updating the value of a setting if user does NOT have the edit-privileged-setting permission (POST)', async () => {
await updatePermission('edit-privileged-setting', []);
request
return request
.post(api('settings/LDAP_Enable'))
.set(credentials)
.send({
Expand Down

0 comments on commit 45c063f

Please sign in to comment.