ref: master
test/functional/map_balloon_controller_test.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
require_relative '../test_helper' class MapBalloonControllerTest < ActionController::TestCase def setup @controller = MapBalloonController.new @profile = create_user('test_profile').person login_as(@profile.identifier) end should 'find person to show' do pers = create(Person, :name => 'Person1', :user_id => fast_create(User).id, :identifier => 'pers1') get :person, :id => pers.id assert_equal pers, assigns(:profile) end should 'find enterprise to show' do ent = Enterprise.create!(:name => 'Enterprise1', :identifier => 'ent1') get :enterprise, :id => ent.id assert_equal ent, assigns(:profile) end should 'find community to show' do comm = Community.create!(:name => 'Community1', :identifier => 'comm1') get :community, :id => comm.id assert_equal comm, assigns(:profile) end end |