-
Notifications
You must be signed in to change notification settings - Fork 19
Backend Pattern Test Controller
Ferris Tseng edited this page Jan 2, 2020
·
3 revisions
Tests a controller.
spec/controllers
To avoid creating a new user, most controller specs that only require a user to be authenticated, but isn’t specifically testing authentication, we should be using:
allow(controller).to receive(:verify_authentication).and_return(true)
as opposed to User.authenticate!
.
Pattern | Description |
---|