Sha256: 9a8466760d2fba6800cb74ead004cd22003837a19daf4dacbe4f286df873d4e5

Contents?: true

Size: 875 Bytes

Versions: 2

Compression:

Stored size: 875 Bytes

Contents

require 'solidus_braintree_helper'

RSpec.describe "viewing the configuration interface", type: :feature do
  stub_authorization!

  # Regression to ensure this page still renders on old versions of solidus
  it "doesn't raise any errors due to unavailable route helpers" do
    visit "/solidus_braintree/configurations/list"
    expect(page).to have_content("Braintree Configurations")
  end

  # Regression to ensure this page renders on Solidus 2.4
  it "doesn't raise any errors due to unavailable preference field partial" do
    Rails.application.config.spree.payment_methods << SolidusBraintree::Gateway
    Spree::PaymentMethod.create!(
      type: 'SolidusBraintree::Gateway',
      name: 'Braintree Payments'
    )
    visit '/admin/payment_methods'
    page.find('a[title="Edit"]').click
    expect(page).to have_field 'Name', with: 'Braintree Payments'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solidus_braintree-3.0.1 spec/system/backend/configuration_spec.rb
solidus_braintree-3.0.0 spec/system/backend/configuration_spec.rb