+ ##
+ # test the blocks_by action with invalid pages
+ def test_blocks_by_invalid_paged
+ user = create(:moderator_user)
+
+ %w[-1 0 fred].each do |id|
+ get user_blocks_by_path(user, :before => id)
+ assert_redirected_to :controller => :errors, :action => :bad_request
+
+ get user_blocks_by_path(user, :after => id)
+ assert_redirected_to :controller => :errors, :action => :bad_request
+ end
+ end
+