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

MOB ID-440 Refactor/engooden CreateUserSpec and InviteUserspec. #998

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

Ghost-in-a-Jar
Copy link
Contributor

@Ghost-in-a-Jar Ghost-in-a-Jar commented Feb 21, 2023

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

"allUsersGroup" should beEnabledIn(status)
"adminEnabled" should beEnabledIn(status)
"tosAccepted" shouldNot beEnabledIn(status)
val userWithBoth = (genWorkbenchUserBoth.sample.get, "user with google and azure ids")
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the tuples, my only concern is that it makes it a little harder to read it in the code - although the test output is still clear. Maybe we could add a comment or a readme somewhere suggesting that as an easy way to debug/check expected behavior? Maybe everyone would think to do that, but I'm not used to the test results printing out in such a helpful manner so I'm not sure if it would occur to me if I were a dev looking at this for the first time.

describe("that does not already exist") {
newUsers.foreach { userTuple =>
val (newUser, description) = userTuple
describe(s"UserService.createUser with a $description") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: can we reword this message a tiny bit? I find the phrasing of "when a new user… that does not already exist… Userservice.createUser with a user with google and azure ids" more confusing than it was before

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it needs one additional verb or something

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.

3 participants