<commit_before>require 'rails_helper'

describe BaseOrganisation, type: :model do
  describe '#has_been_updated_recently?' do
    subject { FactoryGirl.create(:organisation, updated_at: Time.now) }

    it { is_expected.to have_been_updated_recently }

    context "updated too long ago" do
      subject { FactoryGirl.create(:organisation, updated_at: 365.days.ago)}
      it { is_expected.not_to have_been_updated_recently }<commit_msg>organisation should have a name<commit_after>require 'rails_helper'

describe BaseOrganisation, type: :model do
  describe '#validation' do
    it 'should have a valid factory' do
      expect(FactoryGirl.build(:organisation)).to be_valid
    end 

     it 'is should have name' do
        expect(FactoryGirl.build(:organisation, name: '')).not_to be_valid
      end
    end 
  end

  describe '#has_been_updated_recently?' do
    subject { FactoryGirl.create(:organisation, updated_at: Time.now) }

    it { is_expected.to have_been_updated_recently }

    context "updated too long ago" do
      subject { FactoryGirl.create(:organisation, updated_at: 365.days.ago)}
      it { is_expected.not_to have_been_updated_recently }
{'fraction_non_alphanumeric': 0.08841201716738198, 'fraction_numerical': 0.005150214592274678, 'mean_word_length': 4.205357142857143, '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': '3383330', 'n_tokens_mistral': 382, 'n_tokens_neox': 345, 'n_words': 90}