From 5efe2b44ab6e087c43ccad2cc3d6a79c9e095503 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Thu, 23 Jul 2009 18:39:29 -0300 Subject: [PATCH] ActionItem1178: fixing profile image tests --- test/unit/profile_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/profile_test.rb b/test/unit/profile_test.rb index b82129c..1187bf1 100644 --- a/test/unit/profile_test.rb +++ b/test/unit/profile_test.rb @@ -1341,13 +1341,13 @@ class ProfileTest < Test::Unit::TestCase should 'validates profile image when save' do profile = Profile.create!(:name => 'Profile for testing ', :identifier => 'profilefortesting', :image_builder => {:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png')}) - profile.image.expects(:valid?) - assert profile.valid? + profile.image.expects(:valid?).returns(false).at_least_once + assert !profile.valid? end should 'profile is invalid when image not valid' do profile = Profile.create!(:name => 'Profile for testing ', :identifier => 'profilefortesting', :image_builder => {:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png')}) - profile.image.expects(:valid?) + profile.image.expects(:valid?).returns(false).at_least_once profile.image.errors.add(:size, "fake error") assert !profile.valid? end -- libgit2 0.21.2