session[:user] = create(:user).id
post :create, :params => { :redaction => { :title => "Foo", :description => "Description here." } }
session[:user] = create(:user).id
post :create, :params => { :redaction => { :title => "Foo", :description => "Description here." } }
delete :destroy, :params => { :id => redaction.id }
assert_response :redirect
assert_redirected_to(redaction_path(redaction))
delete :destroy, :params => { :id => redaction.id }
assert_response :redirect
assert_redirected_to(redaction_path(redaction))
end
def test_delete_non_moderator
session[:user] = create(:user).id
delete :destroy, :params => { :id => create(:redaction).id }
end
def test_delete_non_moderator
session[:user] = create(:user).id
delete :destroy, :params => { :id => create(:redaction).id }
get :edit, :params => { :id => create(:redaction).id }
assert_response :redirect
get :edit, :params => { :id => create(:redaction).id }
assert_response :redirect
redaction = create(:redaction)
put :update, :params => { :id => redaction.id, :redaction => { :title => "Foo", :description => "Description here." } }
redaction = create(:redaction)
put :update, :params => { :id => redaction.id, :redaction => { :title => "Foo", :description => "Description here." } }