Sha256: bed3862999bbad27ebcaa4d389caa3826a44ce0910e5cbfa1230d6cdfe72d28a

Contents?: true

Size: 1.11 KB

Versions: 43

Compression:

Stored size: 1.11 KB

Contents

# frozen_string_literal: true

require 'rails_helper'

class FakesController < ApplicationController
  include Spree::Core::ControllerHelpers::StrongParameters
end

RSpec.describe Spree::Core::ControllerHelpers::StrongParameters, type: :controller do
  controller(FakesController) {}

  describe '#permitted_attributes' do
    it 'returns Spree::PermittedAttributes module' do
      expect(controller.permitted_attributes).to eq Spree::PermittedAttributes
    end
  end

  describe '#permitted_payment_attributes' do
    it 'returns Array class' do
      expect(controller.permitted_payment_attributes.class).to eq Array
    end
  end

  describe '#permitted_checkout_attributes' do
    it 'returns Array class' do
      expect(controller.permitted_checkout_attributes.class).to eq Array
    end
  end

  describe '#permitted_order_attributes' do
    it 'returns Array class' do
      expect(controller.permitted_order_attributes.class).to eq Array
    end
  end

  describe '#permitted_product_attributes' do
    it 'returns Array class' do
      expect(controller.permitted_product_attributes.class).to eq Array
    end
  end
end

Version data entries

43 entries across 43 versions & 2 rubygems

Version Path
solidus_core-2.10.1 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.9.5 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.10.0 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.9.4 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.6.6 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.7.4 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.8.5 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.9.3 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.9.2 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.10.0.beta1 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.7.3 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.6.5 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.9.1 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.9.0 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.9.0.rc.1 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.8.4 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.8.3 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.7.2 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.6.4 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb
solidus_core-2.8.2 spec/lib/spree/core/controller_helpers/strong_parameters_spec.rb