functionality testing of controller in ruby on rails -


i have product controller in have method homepage , _homepage.html.erb file in views. how test method assert should response success. created productcontrllertest.rb in test/functional , wrote below code

require 'test_helper' class productcontrollertest < actioncontroller::testcase   test "should homepage"     :homepage     assert_response :success   end  end 

and have routes.rb file "product/homepage"

when run test command bundle exec rake test:functionals getting error.

error nomethoderror: undefined method `authenticate' nil:nilclass 

please me fix error.

require 'test_helper' class productcontrollertest < actioncontroller::testcase   test "should homepage"     'homepage/1'     assert_response :success   end  end 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -