<commit_before>require "test_helper"

class Admin::EditionLegacyAssociationsControllerTest < ActionController::TestCase
  include Admin::EditionRoutesHelper

  should_be_an_admin_controller

  view_test "should render edit form correctly populated" do
    stub_publishing_api_has_linkables(
      [
        {
          "content_id" => "WELLS",
          "internal_name" => "Oil and Gas / Wells",
          "publication_state" => "published",
        },
        {
          "content_id" => "FIELDS",
          "internal_name" => "Oil and Gas / Fields",
          "publication_state" => "published",
        },
        {
          "content_id" => "OFFSHORE",
          "internal_name" => "Oil and Gas / Offshore",
          "publication_state" => "published",<commit_msg>Update legacy associations controller test to have a user<commit_after>require "test_helper"

class Admin::EditionLegacyAssociationsControllerTest < ActionController::TestCase
  include Admin::EditionRoutesHelper

  setup do
    login_as :gds_editor
  end

  should_be_an_admin_controller

  view_test "should render edit form correctly populated" do
    stub_publishing_api_has_linkables(
      [
        {
          "content_id" => "WELLS",
          "internal_name" => "Oil and Gas / Wells",
          "publication_state" => "published",
        },
        {
          "content_id" => "FIELDS",
          "internal_name" => "Oil and Gas / Fields",
          "publication_state" => "published",
        },
        {
          "content_id" => "OFFSHORE",
          "internal_name" => "Oil and Gas / Offshore",
          "publication_state" => "published",
{'fraction_non_alphanumeric': 0.11015384615384616, 'fraction_numerical': 0.0, 'mean_word_length': 2.6053215077605323, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '3226777', 'n_tokens_mistral': 483, 'n_tokens_neox': 473, 'n_words': 100}