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

Refactor Scim.Scim.UserSpec tests to use composable pieces #2762

Merged
merged 3 commits into from
Oct 13, 2022

Conversation

isovector
Copy link
Contributor

This PR is a minor cleanup of some of the tests from #2637, which are delightful examples of writing tests against Polysemy. It tests the same things, but in a slightly more reusable way, notably:

  • Factoring the mock brig interpreters into a single, parameterized version
  • Adding a little combinator withActiveUser for building those parameters
  • Introducing a combinator ignoringState to dramatically reduce the typing burden

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@isovector isovector temporarily deployed to cachix October 11, 2022 20:31 Inactive
@isovector isovector temporarily deployed to cachix October 11, 2022 20:31 Inactive
@isovector
Copy link
Contributor Author

@supersven @fisx please review if you have some time :)

@isovector isovector temporarily deployed to cachix October 11, 2022 20:32 Inactive
@isovector isovector temporarily deployed to cachix October 11, 2022 20:32 Inactive
@mdimjasevic mdimjasevic self-requested a review October 12, 2022 07:31
@elland elland added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Oct 12, 2022
Copy link
Contributor

@mdimjasevic mdimjasevic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

services/spar/test/Test/Spar/Scim/UserSpec.hs Show resolved Hide resolved
@mdimjasevic mdimjasevic merged commit 1987e0d into wireapp:develop Oct 13, 2022
@isovector
Copy link
Contributor Author

@fisx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants