<commit_before>require 'test_helper'

class ApplicationHelperTest < ActionView::TestCase

  # Stub current_user
  def current_user
  end

  test "canonical_hostname in test" do
    assert_equal 'test.studio.code.org', CDO.canonical_hostname('studio.code.org')
    assert_equal 'test.code.org', CDO.canonical_hostname('code.org')
  end

  test "canonical_hostname in prod" do
    set_env :production
    assert_equal 'studio.code.org', CDO.canonical_hostname('studio.code.org')
    assert_equal 'code.org', CDO.canonical_hostname('code.org')
  end

  test "canonical_hostname in staging" do
    set_env :staging
    assert_equal 'staging.studio.code.org', CDO.canonical_hostname('studio.code.org')
    assert_equal 'staging.code.org', CDO.canonical_hostname('code.org')
  end

  test "canonical_hostname in development" do
    set_env :development
    assert_equal 'localhost.studio.code.org', CDO.canonical_hostname('studio.code.org')
    assert_equal 'localhost.code.org', CDO.canonical_hostname('code.org')
  end

  test "code_org_root_path in test" do
    assert_equal '//test.code.org', code_org_root_path
  end

  test "code_org_root_path in prod" do
    set_env :production
    assert_equal '//code.org', code_org_root_path
  end

  test "code_org_root_path in staging" do
    set_env :staging
    assert_equal '//staging.code.org', code_org_root_path
  end

  test "code_org_root_path in development" do
    set_env :development
    assert_equal '//localhost.code.org:9393', code_org_root_path
  end<commit_msg>make test work on test<commit_after>require 'test_helper'

class ApplicationHelperTest < ActionView::TestCase

  # Stub current_user
  def current_user
  end

  test "canonical_hostname in test" do
    assert_equal 'test.studio.code.org', CDO.canonical_hostname('studio.code.org')
    assert_equal 'test.code.org', CDO.canonical_hostname('code.org')
  end

  test "canonical_hostname in prod" do
    set_env :production
    assert_equal 'studio.code.org', CDO.canonical_hostname('studio.code.org')
    assert_equal 'code.org', CDO.canonical_hostname('code.org')
  end

  test "canonical_hostname in staging" do
    set_env :staging
    assert_equal 'staging.studio.code.org', CDO.canonical_hostname('studio.code.org')
    assert_equal 'staging.code.org', CDO.canonical_hostname('code.org')
  end

  test "canonical_hostname in development" do
    set_env :development
    assert_equal 'localhost.studio.code.org', CDO.canonical_hostname('studio.code.org')
    assert_equal 'localhost.code.org', CDO.canonical_hostname('code.org')
  end

  test "code_org_root_path in test" do
    assert_equal '//test.code.org', code_org_root_path
  end

  test "code_org_root_path in prod" do
    set_env :production
    assert_equal '//code.org', code_org_root_path
  end

  test "code_org_root_path in staging" do
    set_env :staging
    assert_equal '//staging.code.org', code_org_root_path
  end

  test "code_org_root_path in development" do
    set_env :development
    assert_equal "//localhost.code.org:#{CDO.pegasus_port}", code_org_root_path
  end
{'fraction_non_alphanumeric': 0.10130718954248366, 'fraction_numerical': 0.00130718954248366, 'mean_word_length': 4.408127208480566, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5893823', 'n_tokens_mistral': 1068, 'n_tokens_neox': 1038, 'n_words': 215}