<commit_before>require "rails_helper"

RSpec.describe "show multipage" do
  let(:content_item) {{
    "content_id": SecureRandom.uuid,
    "base_path": "/vat-rates",
    "title": "VAT rates",
    "description": "Something about VAT",
    "details": {
      "updated_at": "2015-10-14T12:00:10+01:00",
    }
  }}
  before do
    content_store_has_item("/vat-rates", content_item)
  end

  scenario "requesting a path with an encoded slash" do
    expect {
      visit "/vat-rates%2F"
    }.to raise_error(ActionController::RoutingError)
  end

  scenario "requesting atom format for multipage#show" do
    expect {
      visit "/vat-rates.atom"
    }.to raise_error(ActionController::RoutingError)
  end

  scenario "requesting a valid path" do<commit_msg>Add format to attributes as this is required by model<commit_after>require "rails_helper"

RSpec.describe "show multipage" do
  let(:content_item) {{
    "content_id": SecureRandom.uuid,
    "base_path": "/vat-rates",
    "title": "VAT rates",
    "description": "Something about VAT",
    "details": {
      "updated_at": "2015-10-14T12:00:10+01:00",
    },
    "format": "guide",
  }}
  before do
    content_store_has_item("/vat-rates", content_item)
  end

  scenario "requesting a path with an encoded slash" do
    expect {
      visit "/vat-rates%2F"
    }.to raise_error(ActionController::RoutingError)
  end

  scenario "requesting atom format for multipage#show" do
    expect {
      visit "/vat-rates.atom"
    }.to raise_error(ActionController::RoutingError)
  end

  scenario "requesting a valid path" do
{'fraction_non_alphanumeric': 0.1253180661577608, 'fraction_numerical': 0.024173027989821884, 'mean_word_length': 3.572674418604651, 'pattern_counts': {'":': 13, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4994885', 'n_tokens_mistral': 561, 'n_tokens_neox': 513, 'n_words': 130}