Sha256: a6dee93d0deb0cc0d289113c26e87f40d6959d305e74c3f24b0c849963eb5464
Contents?: true
Size: 738 Bytes
Versions: 2
Compression:
Stored size: 738 Bytes
Contents
require 'solidus_braintree_helper' RSpec.describe SolidusBraintree::BraintreeAdminHelper do describe '#braintree_transaction_link' do subject { helper.braintree_transaction_link(payment) } let(:payment_method) { create_gateway } let(:payment) do instance_double(Spree::Payment, payment_method: payment_method, response_code: 'abcde') end let(:merchant_id) { payment_method.preferences[:merchant_id] } it 'generates a link to Braintree admin' do expect(subject).to eq "<a title=\"Show payment on Braintree\" target=\"_blank\" rel=\"noopener\" href=\"https://sandbox.braintreegateway.com/merchants/#{merchant_id}/transactions/abcde\">abcde</a>" # rubocop:disable Layout/LineLength end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
solidus_braintree-3.0.1 | spec/helpers/solidus_braintree/braintree_admin_helper_spec.rb |
solidus_braintree-3.0.0 | spec/helpers/solidus_braintree/braintree_admin_helper_spec.rb |