diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-09-02 01:12:05 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-09-08 21:50:07 +0300 |
commit | d86c6666623a90d46fa4cfe624c67e86c6ad235f (patch) | |
tree | c3290abd871d37f2addb0794b6f526fc31e9d66c /spec/controllers/projects/issues_controller_spec.rb | |
parent | 796bdf1dcb86b5e77fc054208afc632f75518605 (diff) |
Refresh todos count cache when an Issue/MR is deleted
Diffstat (limited to 'spec/controllers/projects/issues_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/issues_controller_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/controllers/projects/issues_controller_spec.rb b/spec/controllers/projects/issues_controller_spec.rb index 16929767ddf..90419368f22 100644 --- a/spec/controllers/projects/issues_controller_spec.rb +++ b/spec/controllers/projects/issues_controller_spec.rb @@ -370,6 +370,12 @@ describe Projects::IssuesController do expect(response).to have_http_status(302) expect(controller).to set_flash[:notice].to(/The issue was successfully deleted\./).now end + + it 'delegates the update of the todos count cache to TodoService' do + expect_any_instance_of(TodoService).to receive(:destroy_issue).with(issue, owner).once + + delete :destroy, namespace_id: project.namespace.path, project_id: project.path, id: issue.iid + end end end |