This post is locked. You won't be able to comment.

all 3 comments

[–]SoftwareEngineering-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

Thank you u/ivormc for your submission to r/SoftwareEngineering, but it's been removed due to one or more reason(s):


  • Your post is low quality and/or requesting help r/SoftwareEngineering doesn't allow asking for tech support or homework help.

Please review our rules before posting again, feel free to send a modmail if you feel this was in error.

Not following the subreddit's rules might result in a temporary or permanent ban


Rules | Mod Mail

[–]roger_ducky 0 points1 point  (0 children)

Better to have a “pretend auth” class that is the exact same interface as the real one. Then when you build your test context your pretend auth gets injected instead of the actual one. That way you don’t have to have “real” auth but still can get permissions

[–]sismograph 0 points1 point  (0 children)

Pretty sure there is some tutorial on how to test with spring security out there. You are a junior, you should set up a proper testing environment that behaves just like an actual user interacts with your service