diff options
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/members_controller_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/members_controller_test.rb b/test/functional/members_controller_test.rb index a1ab6f93a..be8b7a343 100644 --- a/test/functional/members_controller_test.rb +++ b/test/functional/members_controller_test.rb @@ -25,6 +25,17 @@ class MembersControllerTest < ActionController::TestCase @request.session[:user_id] = 2 end + def test_new + get :new, :project_id => 1 + assert_response :success + end + + def test_xhr_new + xhr :get, :new, :project_id => 1 + assert_response :success + assert_equal 'text/javascript', response.content_type + end + def test_create assert_difference 'Member.count' do post :create, :project_id => 1, :membership => {:role_ids => [1], :user_id => 7} |