[Dev Env]: Database User Privacy Test Improvements · Issue #156 · AnswerOverflow/AnswerOverflow · GitHub
Skip to content

[Dev Env]: Database User Privacy Test Improvements #156

Description

@RhysSullivan

aspect

Testing

Suggestion?

With the changes in #136 - test coverage for the database package decreased a lot. While this is fine for 1 line functions that just call Prisma, there are more complex functions that ensure user privacy is being respected which need tests for to keep their functionality consistent

These scenarios are below:

Discord Accounts:

  • Fail on creating an ignored discord account
  • Only bulk create Discord accounts, only create discord accounts that are not ignored
  • Only bulk create Discord accounts, only return discord accounts that are not ignored
  • On delete account, add it to the ignored account router

Messages:

  • Fail upserting a message from an ignored Discord account
  • On bulk upsert of messages, only create messages from non ignored Discord accounts

Possible Solutions

These tests should both validate the return values of the functions and also read from the database to ensure that user data was not created

Extra Information

No response

Metadata

Metadata

Assignees

Labels

🛠️dev envRelates to developer environment / DX

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions