Sha256: 999300745ff88a8364630caf8a8b93a4857c2c47b938ca9637f00cf0e5a4aa7d

Contents?: true

Size: 689 Bytes

Versions: 62

Compression:

Stored size: 689 Bytes

Contents

require 'test_helper'

module Workarea
  module Storefront
    class LayoutIntegrationTest < Workarea::IntegrationTest
      class LayoutController < Storefront::ApplicationController
        def test
          render inline: 'Foo bar', layout: current_layout
        end
      end

      setup do
        Rails.application.routes.prepend do
          get 'layout_test', to: "#{LayoutController.controller_path}#test"
        end

        Rails.application.reload_routes!
      end

      def test_layout
        get '/layout_test'
        assert_match(/<html/, response.body)

        get '/layout_test', xhr: true
        refute_match(/<html/, response.body)
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-storefront-3.4.13 test/integration/workarea/storefront/layout_integration_test.rb
workarea-storefront-3.4.12 test/integration/workarea/storefront/layout_integration_test.rb