+ get :index, :params => { :language => "sl" }
+ check_diary_index
+ end
+
+ def test_index_paged
+ # Create several pages worth of diary entries
+ create_list(:diary_entry, 50)
+
+ # Try and get the index
+ get :index
+ assert_response :success
+ assert_select "div.diary_post", :count => 20
+
+ # Try and get the second page
+ get :index, :params => { :page => 2 }
+ assert_response :success
+ assert_select "div.diary_post", :count => 20