gitlab-org--gitlab-foss/spec/workers/group_destroy_worker_spec.rb
Thong Kuah d6b952ad3e
Add frozen_string_literal to spec/workers
Adds `# frozen_string_literal: true` to spec/workers ruby files
2019-04-01 13:35:22 -03:00

21 lines
507 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
describe GroupDestroyWorker do
let(:group) { create(:group) }
let(:user) { create(:admin) }
let!(:project) { create(:project, namespace: group) }
subject { described_class.new }
describe "#perform" do
it "deletes the project" do
subject.perform(group.id, user.id)
expect(Group.all).not_to include(group)
expect(Project.all).not_to include(project)
expect(Dir.exist?(project.path)).to be_falsey
end
end
end