Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem developing tests for Table.find( :all )

Status
Not open for further replies.

clemcrock

Programmer
Dec 17, 2006
63
US
Hello,

I'm brand new to Ruby and I'm trying to write a test method for this simple function:

Code:
@count = Account.count@accounts_pages, @accounts = paginate :accounts, :include => :spaces,  :order_by => 'accounts.created_at ASC', :per_page => 20
      
render :action => 'list

Then I try to write a test based on this concept as follows:

Code:
  def test_list
    get :index, :context => 'admin'
    assert_response :success
    assert_template 'list'
    assert_not_nil assigns(:accounts)
  end

And I get this error: Expected response to be a <:success>, but was <302>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top