Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2016-03-14 18:49:24 +0300
committerJacob Vosmaer <contact@jacobvosmaer.nl>2016-03-14 18:49:24 +0300
commit021d53c96d308df7c721984435442993357a3414 (patch)
tree13bd15cb10952efd5c759a5dee5b8de6f243e056 /spec/services/projects
parenta02fe251df7ea7316f51850fe603e7e5ac4431e2 (diff)
Run 'git gc' every 10 pushes
Diffstat (limited to 'spec/services/projects')
-rw-r--r--spec/services/projects/housekeeping_service_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/services/projects/housekeeping_service_spec.rb b/spec/services/projects/housekeeping_service_spec.rb
index 7cddeb5c354..32552d882aa 100644
--- a/spec/services/projects/housekeeping_service_spec.rb
+++ b/spec/services/projects/housekeeping_service_spec.rb
@@ -37,4 +37,12 @@ describe Projects::HousekeepingService do
expect(subject.needed?).to eq(true)
end
end
-end \ No newline at end of file
+
+ describe :increment! do
+ it 'increments the pushes_since_gc counter' do
+ expect(project.pushes_since_gc).to eq(0)
+ subject.increment!
+ expect(project.pushes_since_gc).to eq(1)
+ end
+ end
+end