Commit 6569d157449ec8ac6ee29f043f9b3bec6b32cf5e

Authored by AntonioTerceiro
1 parent 36cfad76

ActionItem154: removing now useless test + adapting other two


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1414 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 4 additions and 9 deletions   Show diff stats
test/unit/profile_test.rb
@@ -219,26 +219,21 @@ class ProfileTest < Test::Unit::TestCase @@ -219,26 +219,21 @@ class ProfileTest < Test::Unit::TestCase
219 assert_equal profile, Profile['testprofile'] 219 assert_equal profile, Profile['testprofile']
220 end 220 end
221 221
222 - should 'have boxes and blocks upon creation' do 222 + should 'have boxes upon creation' do
223 profile = Profile.create!(:name => 'test profile', :identifier => 'testprofile') 223 profile = Profile.create!(:name => 'test profile', :identifier => 'testprofile')
224 224
225 assert profile.boxes.size > 0 225 assert profile.boxes.size > 0
226 - assert profile.blocks.size > 0  
227 - end  
228 -  
229 - should 'have at least one MainBlock upon creation' do  
230 - profile = Profile.create!(:name => 'test profile', :identifier => 'testprofile')  
231 - assert(profile.blocks.any? { |block| block.kind_of? MainBlock })  
232 end 226 end
233 227
234 should 'remove boxes and blocks when removing profile' do 228 should 'remove boxes and blocks when removing profile' do
235 profile = Profile.create!(:name => 'test profile', :identifier => 'testprofile') 229 profile = Profile.create!(:name => 'test profile', :identifier => 'testprofile')
  230 + profile.boxes.first.blocks << MainBlock.new
236 231
237 profile_boxes = profile.boxes.size 232 profile_boxes = profile.boxes.size
238 profile_blocks = profile.blocks.size 233 profile_blocks = profile.blocks.size
239 234
240 - assert profile_boxes > 0  
241 - assert profile_blocks > 0 235 + assert profile_boxes > 0, 'profile should have some boxes'
  236 + assert profile_blocks > 0, 'profile should have some blocks'
242 237
243 boxes = Box.count 238 boxes = Box.count
244 blocks = Block.count 239 blocks = Block.count