<commit_before>require 'rails_helper'

RSpec.describe TournamentsController, type: :controller do
  render_views

  describe "GET show" do
    let(:action) {
      xhr :get, :show, format: :json, id: tournament_id
    }

    subject(:results) {JSON.parse(response.body)}

    context "when the player exists" do
      let(:tournament) {
        FactoryGirl::create(:tournament)
      }
      let(:tournament_id){tournament.id}

      it "should return 200 status" do
        action<commit_msg>Cosmetics: fix wrong description in tournament test<commit_after>require 'rails_helper'

RSpec.describe TournamentsController, type: :controller do
  render_views

  describe "GET show" do
    let(:action) {
      xhr :get, :show, format: :json, id: tournament_id
    }

    subject(:results) {JSON.parse(response.body)}

    context "when the tournament exists" do
      let(:tournament) {
        FactoryGirl::create(:tournament)
      }
      let(:tournament_id){tournament.id}

      it "should return 200 status" do
        action
{'fraction_non_alphanumeric': 0.10408560311284047, 'fraction_numerical': 0.005836575875486381, 'mean_word_length': 3.305439330543933, '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': '5443413', 'n_tokens_mistral': 329, 'n_tokens_neox': 298, 'n_words': 81}