What You’ve Done

In this chapter you applied testing techniques to security. You added a user model to the application and saw how to simulate a user login for test purposes. You then used that simulated login to test access control through the system.

You also used tests to isolate responsibilities and verify that certain users had access to only certain application resources. Then you applied tests to mass assignment and form modification, which required you to go outside normal integration tests. In the next chapter, you’ll go beyond the application and interact with external services.

Get Rails 5 Test Prescriptions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.