Guest User

Untitled

a guest
Apr 23rd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. require File.dirname(__FILE__) + '/../test_helper'
  2. require 'subscriptions_controller'
  3.  
  4. # Re-raise errors caught by the controller.
  5. class SubscriptionsController; def rescue_action(e) raise e end; end
  6.  
  7. class SubscriptionsControllerTest < Test::Unit::TestCase
  8. def setup
  9. @controller = SubscriptionsController.new
  10. @request = ActionController::TestRequest.new
  11. @response = ActionController::TestResponse.new
  12. end
  13.  
  14. # Replace this with your real tests.
  15. def test_truth
  16. post :remote_verify, {:company=>{:phone=>4170000000,:name=>'TEST LOGISTICS INC',:mc=>029313,:designation=>"Carrier",:address=>"PO BOX 132",:address2=>"",:dispatch=>"41700000",:has_website=>1,:url=>'TEST WEBSITE',:referral_text=>'TEST REFERRAL'},:user=>{:email=>'autpost@loadmax.com',:password=>'loadMAX',:password_confirmation=>'loadMAX'},:csz=>'ROBERTS, ID 83444',:level=>'Gold-39'}
  17. assert_not_nil assigns["company"]
  18. assert_not_nil assigns["company"].referral_text
  19. assert_not_nil assigns["company"].has_website
  20. assert_not_nil assigns["company"].url
  21. assert_equal "TEST WEBSITE",assigns["company"].url
  22. assert_equal "TEST REFERRAL",assigns["company"].referral_text
  23. assert_not_nil assigns["user"]
  24. end
  25. end
Add Comment
Please, Sign In to add comment