+ assert_select "p", "#{normal_user.display_name} has not made any blocks yet."
+ end
+
+ ##
+ # test the blocks_by action with multiple pages
+ def test_blocks_by_paged
+ user = create(:moderator_user)
+ create_list(:user_block, 50, :creator => user)
+
+ get :blocks_by, :params => { :display_name => user.display_name }
+ assert_response :success
+ assert_select "table#block_list", :count => 1 do
+ assert_select "tr", :count => 21
+ end
+
+ get :blocks_by, :params => { :display_name => user.display_name, :page => 2 }
+ assert_response :success
+ assert_select "table#block_list", :count => 1 do
+ assert_select "tr", :count => 21
+ end