From fdaecd8862786964d8df442f7281b4154ff2f8c5 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Sat, 16 Feb 2008 00:22:43 +0000 Subject: [PATCH] ActionItem154: fixing bug in test: must not assume a specific id for fuxture data --- test/functional/profile_design_controller_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/profile_design_controller_test.rb b/test/functional/profile_design_controller_test.rb index 1b32b1d..ab42e42 100644 --- a/test/functional/profile_design_controller_test.rb +++ b/test/functional/profile_design_controller_test.rb @@ -150,7 +150,7 @@ class ProfileDesignControllerTest < Test::Unit::TestCase should 'actually add a new block' do assert_difference Block, :count do - post :add_block, :profile => 'ze', :box_id => 1, :type => RecentDocumentsBlock.name + post :add_block, :profile => 'ze', :box_id => @box1.id, :type => RecentDocumentsBlock.name assert_redirected_to :action => 'index' end end @@ -158,7 +158,7 @@ class ProfileDesignControllerTest < Test::Unit::TestCase should 'not allow to create unknown types' do assert_no_difference Block, :count do assert_raise ArgumentError do - post :add_block, :profile => 'ze', :box_id => 1, :type => "PleaseLetMeCrackYourSite" + post :add_block, :profile => 'ze', :box_id => @box1.id, :type => "PleaseLetMeCrackYourSite" end end end -- libgit2 0.21.2