<commit_before>require 'rails_helper'

describe NodeTypesController do
  let(:node_types) { FactoryGirl::create_list(:node_type, 5) }
  describe '#index' do
    context 'without ids' do
      before do
        get :index, format: :json
      end

      it 'returns 200 status code' do
        expect(response).to have_http_status(:success)
      end

      it 'returns a list of node types' do<commit_msg>use let! to make sure that all test data is present<commit_after>require 'rails_helper'

describe NodeTypesController do
  let!(:node_types) { FactoryGirl::create_list(:node_type, 5) }
  describe '#index' do
    context 'without ids' do
      before do
        get :index, format: :json
      end

      it 'returns 200 status code' do
        expect(response).to have_http_status(:success)
      end

      it 'returns a list of node types' do
{'fraction_non_alphanumeric': 0.08480565371024736, 'fraction_numerical': 0.009422850412249705, 'mean_word_length': 3.106280193236715, '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': '3740466', 'n_tokens_mistral': 263, 'n_tokens_neox': 244, 'n_words': 87}