diff options
author | Stan Hu <stanhu@gmail.com> | 2018-05-18 04:05:11 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-05-18 04:05:11 +0300 |
commit | 6c190d273d18d21e50dea65645185839bf067714 (patch) | |
tree | b1a67f0dfec96ab4ada3e5363317ce408269e46b /spec/requests/api/v3 | |
parent | d6c8a55189d62430c7ca4ffa6e5bb63f15a7efc1 (diff) |
Move API group deletion to Sidekiq
Diffstat (limited to 'spec/requests/api/v3')
-rw-r--r-- | spec/requests/api/v3/groups_spec.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/requests/api/v3/groups_spec.rb b/spec/requests/api/v3/groups_spec.rb index a1cdf583de3..34d4b8e9565 100644 --- a/spec/requests/api/v3/groups_spec.rb +++ b/spec/requests/api/v3/groups_spec.rb @@ -458,9 +458,11 @@ describe API::V3::Groups do describe "DELETE /groups/:id" do context "when authenticated as user" do it "removes group" do - delete v3_api("/groups/#{group1.id}", user1) + Sidekiq::Testing.fake! do + expect { delete v3_api("/groups/#{group1.id}", user1) }.to change(GroupDestroyWorker.jobs, :size).by(1) + end - expect(response).to have_gitlab_http_status(200) + expect(response).to have_gitlab_http_status(202) end it "does not remove a group if not an owner" do @@ -489,7 +491,7 @@ describe API::V3::Groups do it "removes any existing group" do delete v3_api("/groups/#{group2.id}", admin) - expect(response).to have_gitlab_http_status(200) + expect(response).to have_gitlab_http_status(202) end it "does not remove a non existing group" do |