Sha256: 499c735c2654276afac6fb4f6243f140c81849f163371978e42b536268b76399

Contents?: true

Size: 650 Bytes

Versions: 29

Compression:

Stored size: 650 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

describe 'Option Blocks', type: :request do
  let!(:first_request) do
    stub_request(:get, "http://datastore/v2/records?request=first")
      .to_return(status: 200)
  end

  let!(:second_request) do
    stub_request(:get, "http://datastore/v2/records?request=second")
      .to_return(status: 200)
  end

  it 'always ensures option blocks are always reset for new requests',
  dummy_models: true, reset_before: true do
    get '/option_blocks/first'
    expect(first_request).to have_been_made.once
    get '/option_blocks/second'
    expect(second_request).to have_been_made.once
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
lhs-22.1.1.pre spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-22.1.0 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-22.0.0 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-21.3.1 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-21.3.0 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-21.3.0.pre.autoauth.1 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-21.2.4 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-21.2.3 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-21.2.3.pre.preload.pre.providers.pre.too.1 spec/option_blocks/ensure_reset_between_requests_spec.rb