summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2017-12-21 02:08:52 +0100
committerMatija Čupić <matteeyah@gmail.com>2017-12-21 02:08:52 +0100
commit1eb207f3c28f6a03dbd1174838a154da7e64e519 (patch)
tree3eb4d967e199de081a288bf083413b5cd30511f9 /app/controllers
parenta8c016d5bd53756dfc13546736d8a38bfc4333cc (diff)
downloadgitlab-ce-1eb207f3c28f6a03dbd1174838a154da7e64e519.tar.gz
Add tests for projects#reset_cache
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects_controller.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index a2f1b27d0ec..928555c200b 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -176,6 +176,12 @@ class ProjectsController < Projects::ApplicationController
end
def reset_cache
+ if ResetProjectCacheService.new(@project, current_user).execute
+ flash[:notice] = _("Project cache successfully reset.")
+ else
+ flash[:error] = _("Unable to reset project cache.")
+ end
+ redirect_to project_pipelines_path(@project)
end
def export