Commit 85f62237d13fb68c52d5c0068a218f4b0f614a73
Committed by
Antonio Terceiro
1 parent
9b1f10f9
Exists in
master
and in
28 other branches
ActionItem1183: fixed error with profile saved without image
Showing
2 changed files
with
11 additions
and
1 deletions
Show diff stats
lib/acts_as_having_image.rb
test/unit/profile_test.rb
... | ... | @@ -1352,6 +1352,16 @@ class ProfileTest < Test::Unit::TestCase |
1352 | 1352 | assert !profile.valid? |
1353 | 1353 | end |
1354 | 1354 | |
1355 | + should 'profile be valid when image is empty' do | |
1356 | + profile = Profile.create!(:name => 'Profile for testing ', :identifier => 'profilefortesting', :image_builder => {:uploaded_data => ""}) | |
1357 | + assert_valid profile | |
1358 | + end | |
1359 | + | |
1360 | + should 'profile be valid when has no image' do | |
1361 | + profile = Profile.create!(:name => 'Profile for testing ', :identifier => 'profilefortesting') | |
1362 | + assert_valid profile | |
1363 | + end | |
1364 | + | |
1355 | 1365 | should 'copy header and footer after create a person' do |
1356 | 1366 | template = create_user('template').person |
1357 | 1367 | template.custom_footer = "footer customized" | ... | ... |