-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BC-5832- Add deleting creator ID reference from the files entities (the legacy files, rewritten from FeathersJS) in the main user deletion use case #4662
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small improvements, looks good to me overall.
for (let i = 0; i < entities.length; i += 1) { | ||
expect(entities[i].permissions).not.toContain(userPermission); | ||
if (i === 1 || i === 3) { | ||
expect(entities[i]._creatorId).toBe(undefined); | ||
} | ||
expect(entities[i].permissions).toContain(anotherUserPermission); | ||
expect(entities[i].permissions).toContain(yetAnotherUserPermission); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should a test have so much logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test was already existing I just added to it needed data to cover all posibilities after code modification
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already understood. But still I was expecting more separate tests than for and if statements in the tests. For me, the for and if statements are things to test again.
pls find a short concise summary for this PR (normally 50 characters (details can be added in body according to guidelines) |
Co-authored-by: Sergej Hoffmann <[email protected]>
Co-authored-by: Sergej Hoffmann <[email protected]>
for (let i = 0; i < entities.length; i += 1) { | ||
expect(entities[i].permissions).not.toContain(userPermission); | ||
if (i === 1 || i === 3) { | ||
expect(entities[i]._creatorId).toBe(undefined); | ||
} | ||
expect(entities[i].permissions).toContain(anotherUserPermission); | ||
expect(entities[i].permissions).toContain(yetAnotherUserPermission); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already understood. But still I was expecting more separate tests than for and if statements in the tests. For me, the for and if statements are things to test again.
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Description
Added deletion of creator id reference from file entity. Modified service method to wrap it up with other updates to make sure that one file was not counted twice as updated.
Links to Tickets or other pull requests
Changes
Datasecurity
Deployment
New Repos, NPM pakages or vendor scripts
Approval for review
generate-client:server
was executed in vue frontend and changes were tested and put in a PR with the same branch name.