Sha256: fd9a63cc31d909c76a2ab7436f156da4e7190bb7f03933112431248530473ec0

Contents?: true

Size: 392 Bytes

Versions: 62

Compression:

Stored size: 392 Bytes

Contents

require 'test_helper'

module Workarea
  class SaveOrderMetricsTest < Workarea::TestCase
    def test_saves_once_per_order
      order = create_placed_order(email: 'foo@workarea.com')
      refute(order.metrics_saved?)

      2.times { SaveOrderMetrics.perform(order) }
      assert(order.metrics_saved?)
      assert_equal(1, Metrics::User.find('foo@workarea.com').orders)
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.4.27 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.5.4 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.4.26 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.5.3 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.4.25 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.5.2 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.4.24 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.5.1 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.4.23 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.4.22 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.5.0 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.4.21 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.5.0.beta.1 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.4.20 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.4.19 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.4.18 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.4.17 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.4.16 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.4.15 test/workers/workarea/save_order_metrics_test.rb
workarea-core-3.4.14 test/workers/workarea/save_order_metrics_test.rb