diff options
author | James Lopez <james@jameslopez.es> | 2017-05-05 11:43:56 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-05-05 11:43:56 +0300 |
commit | adcff298f8f3041faa29b75ee3711fb4ce1cbb69 (patch) | |
tree | 35c1c8a3239d5f87ebeaa17489d399915ade4b0f /spec/services/projects | |
parent | 1fe8b7f646603239f530b1a18427f4f5bc0e2060 (diff) |
fixed all issues - not doing bulk create.
Diffstat (limited to 'spec/services/projects')
-rw-r--r-- | spec/services/projects/propagate_service_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/projects/propagate_service_spec.rb b/spec/services/projects/propagate_service_spec.rb index d4ec7c0b357..ac25c8b3d56 100644 --- a/spec/services/projects/propagate_service_spec.rb +++ b/spec/services/projects/propagate_service_spec.rb @@ -66,5 +66,17 @@ describe Projects::PropagateService, services: true do expect(service.properties).to eq(service_template.properties) end + + describe 'bulk update' do + it 'creates services for all projects' do + project_total = 5 + stub_const 'Projects::PropagateService::BATCH_SIZE', 3 + + project_total.times { create(:empty_project) } + + expect { described_class.propagate(service_template) }. + to change { Service.count }.by(project_total + 1) + end + end end end |