+ def test_index
+ get :index
+ assert_response :success
+ assert_template :index
+ assert_select "ul#redaction_list", 1 do
+ assert_select "li", Redaction.count
+ end
+ end
+
+ def test_new
+ get :new
+ assert_response :redirect
+ assert_redirected_to login_path(:referer => new_redaction_path)
+ end
+
+ def test_new_moderator
+ session[:user] = create(:moderator_user).id
+
+ get :new
+ assert_response :success
+ assert_template :new
+ end
+
+ def test_new_non_moderator
+ session[:user] = create(:user).id
+
+ get :new
+ assert_response :redirect
+ assert_redirected_to redactions_path
+ end
+
+ def test_create_moderator
+ session[:user] = create(:moderator_user).id