Commit 2c81d81aff63a10e6e5e06307c2822f4412099e2
1 parent
68934890
Exists in
master
and in
28 other branches
ActionItem1126: resist an empty identifier
Showing
2 changed files
with
11 additions
and
0 deletions
Show diff stats
app/controllers/my_profile/profile_editor_controller.rb
test/functional/profile_editor_controller_test.rb
... | ... | @@ -757,4 +757,12 @@ class ProfileEditorControllerTest < Test::Unit::TestCase |
757 | 757 | assert_redirected_to :action => 'index', :profile => 'new_address' |
758 | 758 | end |
759 | 759 | |
760 | + should 'not crash if identifier is left blank' do | |
761 | + c = Community.create!(:name => 'test community', :identifier => 'test_comm') | |
762 | + assert_nothing_raised do | |
763 | + post :edit, :profile => c.identifier, :profile_data => c.attributes.merge('identifier' => '') | |
764 | + end | |
765 | + assert_response :success | |
766 | + end | |
767 | + | |
760 | 768 | end | ... | ... |