testing errors!!

def test_create
    num_articles = Article.count

    post :create, :article => {}

    assert_response :redirect
    assert_redirected_to :action => 'list'

    assert_equal num_articles + 1, Article.count
  end

def test_edit
    get :edit, :id => 1

    assert_response :success
    assert_template 'edit'

    assert_not_nil assigns(:article)
    assert assigns(:article).valid?
end

1) Failure:
test_create(ArticlesControllerTest) [test/functional/
articles_controller_test.rb:99]:
Expected response to be a redirect to <http://test.host/articles/list>
but was a redirect to <http://test.host/admin/login>.

  2) Failure:
test_edit(ArticlesControllerTest) [test/functional/
articles_controller_test.rb:107]:
Expected response to be a <:success>, but was <302>

how do i solve these errors?

thank you

Looks like your controller has a before_filter that checks if the user
is logged in or not. Your tests aren't setting up the user to be
logged in so they get redirected to the loging page. You need to set
the session up in such a way that they will appear logged in (as you
were in some of the other threads you have created recently)

Fred