Sha256: 87f9a4939f84bc8e0715c75c0529f7d32768ec2c35aa56adc122819b180f2512

Contents?: true

Size: 621 Bytes

Versions: 81

Compression:

Stored size: 621 Bytes

Contents

# frozen_string_literal: true

shared_examples_for "a 404 page" do
  describe "visiting the page", driver: :rack_test do
    before do
      allow(Rails.application).to \
        receive(:env_config).with(no_args).and_wrap_original do |m, *|
          m.call.merge(
            "action_dispatch.show_exceptions" => true,
            "action_dispatch.show_detailed_exceptions" => false
          )
        end

      visit target_path
    end

    it "leads to a 404" do
      expect(page).to have_content("The page you're looking for can't be found")

      expect(page).to have_http_status(:not_found)
    end
  end
end

Version data entries

81 entries across 81 versions & 1 rubygems

Version Path
decidim-core-0.26.8 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.27.4 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.27.3 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.26.7 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.26.5 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.27.2 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.27.1 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.26.4 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.27.0 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.26.3 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.27.0.rc2 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.27.0.rc1 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.26.2 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.26.1 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.26.0 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.26.0.rc2 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.26.0.rc1 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.25.2 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.25.1 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.25.0 lib/decidim/core/test/shared_examples/errors.rb