<commit_before>require 'spec_helper'

describe FactlinkApi::UserManager do
  it "should create a user with the right arguments" do
    time = DateTime.now
    DateTime.stub!(now: time)
    FactlinkApi::UserManager.create_user "Gerard", "<EMAIL>", "<PASSWORD>1337"
    @u = User.where(username: "Gerard").first
    @u.encrypted_password.should == '<PASSWORD>'
    @u.email.should == '<EMAIL>'
    @u.confirmed_at.to_i.should == time.to_i
  end
end<commit_msg>Fix UserManager Spec, check for valid_password<commit_after>require 'spec_helper'

describe FactlinkApi::UserManager do
  it "should create a user with the right arguments" do
    time = DateTime.now
    DateTime.stub!(now: time)
    FactlinkApi::UserManager.create_user "Gerard", "<EMAIL>", "<PASSWORD>1337"
    @u = User.where(username: "Gerard").first
    @u.valid_password?("<PASSWORD>").should be_true
    @u.email.should == "<EMAIL>"
    @u.confirmed_at.to_i.should == time.to_i
  end
end
{'fraction_non_alphanumeric': 0.13865546218487396, 'fraction_numerical': 0.008403361344537815, 'mean_word_length': 4.508670520231214, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '7581573', 'n_tokens_mistral': 332, 'n_tokens_neox': 317, 'n_words': 72}