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

security_training_providers_importer.rb « shared_examples « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 69d92964270b516381f13676b8fe175e9d7cf5b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

RSpec.shared_examples 'security training providers importer' do
  let(:security_training_providers) do
    Class.new(ApplicationRecord) do
      self.table_name = 'security_training_providers'
    end
  end

  it 'upserts security training providers' do
    expect { 2.times { subject } }.to change { security_training_providers.count }.from(0).to(2)
    expect(security_training_providers.all.map(&:name)).to match_array(['Kontra', 'Secure Code Warrior'])
  end
end