Sha256: 1097e8f582722ae1e83cb0e7aecfc523f9201183e1543751f7a96aefb5bad13d

Contents?: true

Size: 440 Bytes

Versions: 3

Compression:

Stored size: 440 Bytes

Contents

require 'spec_helper'

describe Spree::Tracker, type: :model do
  describe 'current' do
    it 'returns the first active tracker' do
      tracker = create(:tracker)
      tracker.clear_cache
      expect(Spree::Tracker.current).to eq(tracker)
    end

    it 'does not return an inactive tracker' do
      tracker = create(:tracker, active: false)
      tracker.clear_cache
      expect(Spree::Tracker.current).to be_nil
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spree_analytics_trackers-2.0.0.rc1 spec/models/spree/tracker_spec.rb
spree_analytics_trackers-1.1.0 spec/models/spree/tracker_spec.rb
spree_analytics_trackers-1.0.1 spec/models/spree/tracker_spec.rb