Listing 9.1 Test for the user edit page
Listing 9.2 The user edit action
Listing 9.3 The user edit view
Listing 9.5 Adding a test for the 'Settings' link
Listing 9.6 A test helper to sign users in
Listing 9.7 Adding a 'Settings' link
typo fixed in authentication_specs
Listing 9.8 The initial user update action
Listing 9.9 Tests for the user update action
Listing 9.10 The user update action
fixed typo in user_pages_spec.rb
Listing 9.11 Testing that the edit and update actions are protected
Listing 9.12 Adding a signed_in_user before filter
Listing 9.13 Adding a signin step to the edit and update tests.
Listing 9.11 correct typo
Listing 9.12 correct typo
Listing 9.12 correct typo
Listing 9.14 Testing that the edit and update actions require the right user
Listing 9.15 A correct_user before filter to protect the edit/update pages
Listing 9.16 The current_user? method