diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-06-06 13:35:22 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2017-06-06 13:35:22 +0300 |
commit | 657bc805a4bfee516942a3765eef0a508891a5d7 (patch) | |
tree | e49ef764c14e441ed84502eb0154cbb304323c97 /spec/controllers | |
parent | 323a326c73f4aabf37bf79f8e42350c128983c2d (diff) | |
download | gitlab-ce-657bc805a4bfee516942a3765eef0a508891a5d7.tar.gz |
Add json support to group members leave action in controller
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/groups/group_members_controller_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/controllers/groups/group_members_controller_spec.rb b/spec/controllers/groups/group_members_controller_spec.rb index 60db0192dfd..b6f10162bc6 100644 --- a/spec/controllers/groups/group_members_controller_spec.rb +++ b/spec/controllers/groups/group_members_controller_spec.rb @@ -124,6 +124,13 @@ describe Groups::GroupMembersController do expect(response).to redirect_to(dashboard_groups_path) expect(group.users).not_to include user end + + it 'supports json request' do + delete :leave, group_id: group, format: :json + + expect(response).to have_http_status(200) + expect(response.body).to be_empty + end end context 'and is an owner' do |