<commit_before>require 'rails_helper'

feature 'User signs in' do
  given!(:user) { User.create(email: "<EMAIL>", password: "<PASSWORD>") }

  it "lets a user sign in" do
    visit root_path
    fill_in 'Email', with: user.email
    fill_in 'Password', with: <PASSWORD>
    click_button 'Login'
    friendly_string = "Hello #{user.email}!"
    expect(page).to have_content friendly_string
  end
end<commit_msg>Sessions#create: Implement failed login with flash msg<commit_after>require 'rails_helper'

feature 'User signs in' do
  given!(:user) { User.create(email: "<EMAIL>", password: "<PASSWORD>") }

  it "lets a user sign in" do
    visit root_path
    fill_in 'Email', with: user.email
    fill_in 'Password', with: <PASSWORD>
    click_button 'Login'
    friendly_string = "Hello #{user.email}!"
    expect(page).to have_content friendly_string
  end

end

feature "Logging in with bad credentials says bad things" do
  given!(:user) { User.create(email: "<EMAIL>", password: "<PASSWORD>") }
  it "does not let a user without a valid password sign in" do
    visit root_path
    fill_in 'Email', with: user.email
    fill_in 'Password', with: "<PASSWORD>!"
    click_button 'Login'
    expect(page).to have_content "die in a fire!"
  end
end
{'fraction_non_alphanumeric': 0.1233974358974359, 'fraction_numerical': 0.0, 'mean_word_length': 4.161157024793388, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '911899', 'n_tokens_mistral': 400, 'n_tokens_neox': 399, 'n_words': 131}