Sha256: 67db3be23a65a90aff2162cbbeed6b3c63a819fd5f4120f186761d309061a5a8

Contents?: true

Size: 581 Bytes

Versions: 11

Compression:

Stored size: 581 Bytes

Contents

require "test_helper"

describe Pliny::RequestStore do
  before do
    @env = {
      "REQUEST_IDS" => ["abc", "def"]
    }
  end

  it "seeds :request_id" do
    Pliny::RequestStore.seed(@env)
    assert_equal "abc,def", Pliny::RequestStore.store[:request_id]
  end

  it "seeds :log_context" do
    Pliny::RequestStore.seed(@env)
    assert_equal "abc,def", Pliny::RequestStore.store[:log_context][:request_id]
  end

  it "is cleared by clear!" do
    Pliny::RequestStore.seed(@env)
    Pliny::RequestStore.clear!
    assert_nil Pliny::RequestStore.store[:request_id]
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pliny-0.4.0 test/request_store_test.rb
pliny-0.3.0 test/request_store_test.rb
pliny-0.2.1 test/request_store_test.rb
pliny-0.2.0 test/request_store_test.rb
pliny-0.1.0 test/request_store_test.rb
pliny-0.0.4 test/request_store_test.rb
pliny-0.0.3 test/request_store_test.rb
pliny-0.0.1 test/request_store_test.rb
pliny-0.0.1.pre3 test/request_store_test.rb
pliny-0.0.1.pre2 test/request_store_test.rb
pliny-0.0.1.pre test/request_store_test.rb