Hello,
I'm brand new to Ruby and I'm trying to write a test method for this simple function:
Then I try to write a test based on this concept as follows:
And I get this error: Expected response to be a <:success>, but was <302>
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>