mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Fixed a bug where logged in users could not access a school with a school permission key
This commit is contained in:
@@ -373,12 +373,26 @@ Some Guy
|
||||
success
|
||||
end
|
||||
|
||||
test "logged in user without delegation can get show page when using valid school_permission_key" do
|
||||
sign_in_non_owner
|
||||
@tournament.update(is_public: false)
|
||||
get_show(school_permission_key: @school_permission_key)
|
||||
success
|
||||
end
|
||||
|
||||
test "non logged in user cannot get show page when using invalid school_permission_key" do
|
||||
@tournament.update(is_public: false)
|
||||
get_show(school_permission_key: "invalid-key")
|
||||
redirect
|
||||
end
|
||||
|
||||
test "logged in user without delegation can edit school with valid school_permission_key" do
|
||||
sign_in_non_owner
|
||||
@tournament.update(is_public: false)
|
||||
get_edit(school_permission_key: @school_permission_key)
|
||||
success
|
||||
end
|
||||
|
||||
test "non logged in user can edit school with valid school_permission_key" do
|
||||
@tournament.update(is_public: false)
|
||||
get_edit(school_permission_key: @school_permission_key)
|
||||
|
||||
Reference in New Issue
Block a user