<commit_before>require 'spec_helper'

describe DashboardController do
  include Devise::Test::ControllerHelpers

  # render_views Delaying this part until webpack-rails workflow is found -RC

  describe 'ACME endpoint' do
    it "has a fallback" do
      process :lets_encrypt, method: :get, params: { id: "FOO" }
      expect(response.body).to include(DashboardController::NO_ENV)
    end

    it "renders the terms of service" do
      get :tos_update
      expect(response.status).to eq(200)
      # Delaying this part until webpack-rails workflow is found -RC
      # expect(response.body).to include("webpack/tos_update.js")
    end
  end
end
<commit_msg>Tests for 404 in dashboard controller<commit_after>require 'spec_helper'

describe DashboardController do
  include Devise::Test::ControllerHelpers

  # render_views Delaying this part until webpack-rails workflow is found -RC

  describe 'ACME endpoint' do
    it "has a fallback" do
      process :lets_encrypt, method: :get, params: { id: "FOO" }
      expect(response.body).to include(DashboardController::NO_ENV)
    end

    it "renders the terms of service" do
      get :tos_update
      expect(response.status).to eq(200)
    end

    it "renders the terms of service" do
      get :front_page
      expect(response.status).to eq(200)
    end

    it "renders the terms of service" do
      expect { get :main_app, params: {path: "nope.jpg"} }
        .to raise_error(ActionController::RoutingError)
    end
  end
end

{'fraction_non_alphanumeric': 0.08675184936112978, 'fraction_numerical': 0.008069939475453935, 'mean_word_length': 3.4154302670623147, 'pattern_counts': {'":': 0, '<': 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': '5917828', 'n_tokens_mistral': 472, 'n_tokens_neox': 450, 'n_words': 144}