socialforge/test/functional/users_controller_test.rb

33 lines
580 B
Ruby
Raw Normal View History

require 'test_helper'
class UsersControllerTest < ActionController::TestCase
2014-02-17 16:51:12 +08:00
fixtures :users, :user_extensions
def setup
initial_user_controller
end
def teardown
teardown_user_controller
end
test "test user valid" do
assert @user.valid?, "user valid."
end
test "get user_courses page" do
get :user_courses, {:id => @user.id}
assert_response :success
end
private
def initial_user_controller
2014-02-17 16:51:12 +08:00
@user = users(:person_mao)
@user_yan = users(:person_one)
end
def teardown_user_controller
@user = nil
2014-02-17 16:51:12 +08:00
@user_yan = nil
end
end