Skip to content
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

Board controller authorizations tests #83

Merged

Conversation

unenglishable
Copy link
Member

add tests for board controller authorizations

update with latest main changes

refactor + bug fixes

either a Postgrex error (:user_not_found) or :no_sessions
checks if there are any active sessions for user_id
for tests requiring a user that is not logged in
:user_not_found error
:no_sessions error
in the case that old and new ttl's are invalid, set to max expiry
this ensures keys are all eventually expired regardless of given ttl validity
update writing code section later with doc refactor
since ban key can be empty, it is possible that old TTL is -2
which is a valid number, but will expire the ban key immediately
when set
since moderating key can be empty, it is possible that old TTL is -2
which is a valid number, but will expire the moderating key immediately
when set
akinsey and others added 22 commits October 31, 2023 09:56
needs to check if attrs contains any two keys, not all keys

implement map_contains_any_two_keys_in_list

  uses guard clause for checking empty map
  (a match on %{} matches any map)

use map_contains_any_two_keys_in_list
can be used for checking acl's (private user can only access motd)
… into board-controller-authorizations-tests

resolve conflicts
@unenglishable unenglishable requested a review from akinsey November 6, 2023 20:40
@akinsey akinsey merged commit 0564914 into board-controller-authorizations Nov 6, 2023
@akinsey akinsey deleted the board-controller-authorizations-tests branch November 6, 2023 23:20
Copy link

github-actions bot commented Nov 7, 2023

🎉 This PR is included in version 1.23.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants