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.1.1.pre spec/factories/header.rb
inferno_core-0.1.0 spec/factories/header.rb
inferno_core-0.1.0.pre spec/factories/header.rb
inferno_core-0.0.8 spec/factories/header.rb
inferno_core-0.0.8.pre2 spec/factories/header.rb
inferno_core-0.0.8.pre spec/factories/header.rb
inferno_core-0.0.7 spec/factories/header.rb
inferno_core-0.0.6 spec/factories/header.rb
inferno_core-0.0.5 spec/factories/header.rb
inferno_core-0.0.4 spec/factories/header.rb
inferno_core-0.0.3 spec/factories/header.rb