Sha256: e31b4f09f6ad480c6ee4404989058f170ae20028c4b0dc93e1de820472be61a0

Contents?: true

Size: 535 Bytes

Versions: 7

Compression:

Stored size: 535 Bytes

Contents

# frozen_string_literal: true

describe PUNK::IdentifySessionWorker, :vcr do
  let(:user_agent) { 'Mozilla/5.0 (Windows NT x.y; Win64; x64; rv:10.0) Gecko/20100101 Firefox/10.0' }
  let(:remote_addr) { '92.177.45.168' }
  let(:session) { create(:session, user_agent: user_agent, remote_addr: remote_addr) }

  it 'updates the session data' do
    expect(session.data).to eq({})
    described_class.perform_async(session_id: session.id)
    described_class.drain
    session.reload
    expect(session.data.to_h).not_to eq({})
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
punk-0.3.6 spec/workers/punk/identify_session_worker_spec.rb
punk-0.3.5 spec/workers/punk/identify_session_worker_spec.rb
punk-0.3.4 spec/workers/punk/identify_session_worker_spec.rb
punk-0.3.3 spec/workers/punk/identify_session_worker_spec.rb
punk-0.3.2 spec/workers/punk/identify_session_worker_spec.rb
punk-0.3.1 spec/workers/punk/identify_session_worker_spec.rb
punk-0.2.0 spec/workers/punk/identify_session_worker_spec.rb