Sha256: 847400d18088aa8a78adf768dc3feb30642eb48030892769938af4eca747ec6b

Contents?: true

Size: 440 Bytes

Versions: 91

Compression:

Stored size: 440 Bytes

Contents

FactoryBot.define do
  factory :header, class: 'Inferno::Entities::Header' do
    request

    request_id { request.index }

    sequence(:name) { |n| "HEADER NAME #{n}" }

    sequence(:value) { |n| "HEADER VALUE #{n}" }

    sequence(:type) { |n| n.even? ? 'request' : 'response' }

    initialize_with { new(**attributes) }

    to_create do |instance|
      Inferno::Repositories::Headers.new.create(instance.to_hash)
    end
  end
end

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
inferno_core-0.6.1 spec/factories/header.rb
inferno_core-0.6.0 spec/factories/header.rb
inferno_core-0.5.4 spec/factories/header.rb
inferno_core-0.5.3 spec/factories/header.rb
inferno_core-0.5.2 spec/factories/header.rb
inferno_core-0.5.1 spec/factories/header.rb
inferno_core-0.5.0 spec/factories/header.rb
inferno_core-0.4.44 spec/factories/header.rb
inferno_core-0.4.43 spec/factories/header.rb
inferno_core-0.4.42 spec/factories/header.rb
inferno_core-0.4.41 spec/factories/header.rb
inferno_core-0.4.40 spec/factories/header.rb
inferno_core-0.4.39 spec/factories/header.rb
inferno_core-0.4.38 spec/factories/header.rb
inferno_core-0.4.35 spec/factories/header.rb
inferno_core-0.4.34 spec/factories/header.rb
inferno_core-0.4.33 spec/factories/header.rb
inferno_core-0.4.32 spec/factories/header.rb
inferno_core-0.4.31 spec/factories/header.rb
inferno_core-0.4.30 spec/factories/header.rb