Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require File.dirname(__FILE__) + '/../test_helper'
- require 'subscriptions_controller'
- # Re-raise errors caught by the controller.
- class SubscriptionsController; def rescue_action(e) raise e end; end
- class SubscriptionsControllerTest < Test::Unit::TestCase
- def setup
- @controller = SubscriptionsController.new
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- end
- # Replace this with your real tests.
- def test_truth
- 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'}
- assert_not_nil assigns["company"]
- assert_not_nil assigns["company"].referral_text
- assert_not_nil assigns["company"].has_website
- assert_not_nil assigns["company"].url
- assert_equal "TEST WEBSITE",assigns["company"].url
- assert_equal "TEST REFERRAL",assigns["company"].referral_text
- assert_not_nil assigns["user"]
- end
- end
Add Comment
Please, Sign In to add comment