mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Fixed redirect for match editing and added controller tests. Added wrestler school name to match edit form. Added authorization tests to all matches page.
This commit is contained in:
@@ -362,5 +362,15 @@ class TournamentsControllerTest < ActionController::TestCase
|
||||
redirect
|
||||
end
|
||||
|
||||
test 'logged in non owner should not get all matches page' do
|
||||
sign_in_non_owner
|
||||
get :matches, params: { id: 1 }
|
||||
redirect
|
||||
end
|
||||
|
||||
test 'logged in owner should get all matches page' do
|
||||
sign_in_owner
|
||||
get :matches, params: { id: 1 }
|
||||
success
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user