edit
, update
and destroy
actions behave correctly when the limerick to be modified does not belong to the signed-in user.test/controllers/limericks_controller_test.rb
- controller test file."should not get edit if lack permissions"
- name of new edit
test."should not update limerick if lack permissions"
- name of new update
test."should not destroy limerick if lack permissions"
- name of new destroy
test.User
fixture object one
.User
fixture object two
.one
’s limericks (the first one in their collection).two
.assert_no_difference
- check that the number of Limerick
objects in the database has not changed.assert_response
- check that the HTTP response has a redirect status code.assert_redirected_to
- check that the HTTP redirect was to the root URL.assert_not_nil
- check that a flash['error']
message was set.rails test -v
- command to run tests and generate coverage report.coverage/index.html
- coverage report to view in web browser.