diff options
author | Rémy Coutable <remy@rymai.me> | 2019-04-17 13:23:06 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-04-23 12:43:53 +0300 |
commit | 2537b0c1e0619f03799092ed59c51692baa2cf24 (patch) | |
tree | 416f3d4c4bf625dc5215726daac8a7dcd2340d2e /spec/lib/quality/seeders | |
parent | 383642e10056101dc29d1242c2158b9d911386a9 (diff) |
Provide a new gitlab:seed:issues task
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/lib/quality/seeders')
-rw-r--r-- | spec/lib/quality/seeders/issues_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/lib/quality/seeders/issues_spec.rb b/spec/lib/quality/seeders/issues_spec.rb new file mode 100644 index 00000000000..e17414a541a --- /dev/null +++ b/spec/lib/quality/seeders/issues_spec.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Quality::Seeders::Issues do + let(:project) { create(:project) } + + subject { described_class.new(project: project) } + + describe '#seed' do + it 'seeds issues' do + issues_created = subject.seed(backfill_weeks: 1, average_issues_per_week: 1) + + expect(issues_created).to be_between(0, 2) + expect(project.issues.count).to eq(issues_created) + end + end +end |