Sha256: f844eb03befb55b1024938621f1b4722a55474f4310f45602e761cf474e91d85

Contents?: true

Size: 741 Bytes

Versions: 5

Compression:

Stored size: 741 Bytes

Contents

require 'test_helper'

module Workarea
  decorate Search::Admin::OrderTest, with: :paypal do
    def test_search_text_includes_paypal
      order = Workarea::Order.new(created_at: Time.now)

      Payment.create!(
        id: order.id,
        address: {
          first_name: 'Ben',
          last_name: 'Crouse',
          street: '22 S. 3rd St.',
          city: 'Philadelphia',
          region: 'PA',
          postal_code: '19106',
          country: 'US',
          phone_number: '2159251800'
        },
        paypal: {
          token: '1234',
          payer_id: '1234',
          details: {}
        }
      )

      result = Search::Admin::Order.new(order).search_text

      assert_includes(result, 'PayPal')
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
workarea-paypal-2.0.12 test/models/workarea/search/admin/order_test.decorator
workarea-paypal-2.0.11 test/models/workarea/search/admin/order_test.decorator
workarea-paypal-2.0.10 test/models/workarea/search/admin/order_test.decorator
workarea-paypal-2.0.9 test/models/workarea/search/admin/order_test.decorator
workarea-paypal-2.0.8 test/models/workarea/search/admin/order_test.decorator