summaryrefslogtreecommitdiff
path: root/spec/factories/snippet_repositories.rb
blob: 1f9e68514bbeae6838c04f7365883020b07d4fef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

FactoryBot.define do
  factory :snippet_repository do
    snippet

    after(:build) do |snippet_repository, _|
      snippet_repository.shard_name = snippet_repository.snippet.repository_storage
      snippet_repository.disk_path  = snippet_repository.snippet.disk_path
    end
  end
end