> require File.dirname(__FILE__) + '/../test_helper'

class BooksControllerTest < ActionController::TestCase

def setup
    @controller = BooksController.new
    @request    = ActionController::TestRequest.new
    @response   = ActionController::TestResponse.new
    login_as :sanj
  end

  fixtures :books

def test_should_get_index
    login_as(:sanj)
    get :index
    assert_response :found
    assert_nil assigns(:book)
  end

  def test_should_get_new
    login_as(:sanj)
    get :new
    assert_response :found
  end
def test_should_update_book_name
login_as(:sanj)
assert_difference('Book.count',0) do
post :update, :book => {:name => "shkj"}
end
end


i guess i m assuming that i m updating the name to shjk...

but where do i check that..???

i m totallyy lost and coming up with weird doubts

but thank u all for replyin..i shall look into ur suggestions

thank u

--

You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to