Commit 0f3973a7c641a987410e31039e3e211a82cac926
Committed by
Daniela Feitosa
1 parent
a815c2ef
Exists in
master
and in
29 other branches
Avoiding problems when request 'join_not_logged' via GET
(ActionItem1884)
Showing
2 changed files
with
11 additions
and
0 deletions
Show diff stats
app/controllers/public/profile_controller.rb
test/functional/profile_controller_test.rb
... | ... | @@ -1159,4 +1159,13 @@ class ProfileControllerTest < Test::Unit::TestCase |
1159 | 1159 | assert_tag :tag => 'div', :content => /#{plugin1_tab[:content]}/, :attributes => {:id => /#{plugin1_tab[:id]}/} |
1160 | 1160 | end |
1161 | 1161 | |
1162 | + should 'redirect to profile page when try to request join_not_logged via GET method' do | |
1163 | + community = Community.create!(:name => 'my test community') | |
1164 | + login_as(profile.identifier) | |
1165 | + get :join_not_logged, :profile => community.identifier | |
1166 | + assert_nothing_raised do | |
1167 | + assert_redirected_to community.url | |
1168 | + end | |
1169 | + end | |
1170 | + | |
1162 | 1171 | end | ... | ... |