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.20.1 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.20.0 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.19.1 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.18.1 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.19.0 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.17.2 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.18.0 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.17.1 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.16.1 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.17.0 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.16.0 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.15.2 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.15.1 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.15.0 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.14.4 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.14.3 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.14.2 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.14.1 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.13.1 lib/decidim/core/test/shared_examples/errors.rb
decidim-core-0.12.2 lib/decidim/core/test/shared_examples/errors.rb