From 8a13f248c26f67e29f8b28a36c4b437479af3e73 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Wed, 5 Aug 2009 14:12:59 -0300 Subject: [PATCH] ActionItem1183: better tests --- test/unit/profile_test.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/unit/profile_test.rb b/test/unit/profile_test.rb index 29bbea0..b642e6e 100644 --- a/test/unit/profile_test.rb +++ b/test/unit/profile_test.rb @@ -1353,13 +1353,15 @@ class ProfileTest < Test::Unit::TestCase end should 'profile be valid when image is empty' do - profile = Profile.create!(:name => 'Profile for testing ', :identifier => 'profilefortesting', :image_builder => {:uploaded_data => ""}) - assert_valid profile + profile = Profile.new(:image_builder => {:uploaded_data => ""}) + profile.valid? + assert_nil profile.errors[:image] end should 'profile be valid when has no image' do - profile = Profile.create!(:name => 'Profile for testing ', :identifier => 'profilefortesting') - assert_valid profile + profile = Profile.new + profile.valid? + assert_nil profile.errors[:image] end should 'copy header and footer after create a person' do -- libgit2 0.21.2