debian-mirror-gitlab/spec/tasks/gitlab/seed/group_seed_rake_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
691 B
Ruby
Raw Normal View History

2020-03-09 13:42:32 +05:30
# frozen_string_literal: true
require 'rake_helper'
2021-09-04 01:27:46 +05:30
RSpec.describe 'gitlab:seed:group_seed rake task', :silence_stdout do
2020-03-09 13:42:32 +05:30
let(:username) { 'group_seed' }
let!(:user) { create(:user, username: username) }
let(:task_params) { [2, username] }
before do
Rake.application.rake_require('tasks/gitlab/seed/group_seed')
end
subject { run_rake_task('gitlab:seed:group_seed', task_params) }
it 'performs group seed successfully' do
expect { subject }.not_to raise_error
group = user.groups.first
expect(user.groups.count).to be 3
expect(group.projects.count).to be 2
expect(group.members.count).to be 3
expect(group.milestones.count).to be 2
end
end