<commit_before>require 'spec_helper'

feature 'Users' do
	scenario 'User can create a new account' do
		visit new_user_registration_path
		fill_in 'user_email', with: '<EMAIL>'
		fill_in 'user_password', with: 'password'
		fill_in 'user_password_confirmation', with: 'password'
		click_button 'Sign up'
		expect(current_path).to eq(root_path)
	end

	let (:user) { User.create( email: '<EMAIL>', password: 'password')}
	scenario 'User can login with valid information' do
		visit new_user_session_path
		fill_in 'user_email', with: user.email
		fill_in 'user_password', with: <PASSWORD>
		click_button 'Sign in'
		expect(current_path).to eq(root_path)
	end	
end<commit_msg>accidentally rolled back users features<commit_after>require 'spec_helper'

feature 'Users' do
	scenario 'User can create a new account' do
		visit new_user_registration_path
		fill_in 'user_email', with: '<EMAIL>'
		fill_in 'user_password', with: 'password'
		fill_in 'user_password_confirmation', with: 'password'
		click_button 'Sign up'
		expect(current_path).to eq(root_path)
	end

	scenario 'Password must be 8 characters or more' do
		visit new_user_registration_path
		fill_in 'user_email', with: '<EMAIL>'
		fill_in 'user_password', with: '<PASSWORD>'
		fill_in 'user_password_confirmation', with: '<PASSWORD>'
		click_button 'Sign up'
		expect(page.body).to have_content("Password is too short (minimum is 8 characters)")
	end

	scenario 'User cannot create duplicate email' do
		User.create( email: '<EMAIL>', password: 'password')
		visit new_user_registration_path
		fill_in 'user_email', with: '<EMAIL>'
		fill_in 'user_password', with: 'password'
		fill_in 'user_password_confirmation', with: 'password'
		click_button 'Sign up'
		expect(page).to have_content("Email has already been taken")
	end


	let (:user) { User.create( email: '<EMAIL>', password: 'password')}
	scenario 'User can login with valid information' do
		visit new_user_session_path
		fill_in 'user_email', with: user.email
		fill_in 'user_password', with: <PASSWORD>
		click_button 'Sign in'
		expect(current_path).to eq(root_path)
	end

	scenario 'User cannot login with invalid information' do
		visit new_user_session_path
		fill_in 'user_email', with: '<EMAIL>'
		fill_in 'user_password', with: '<PASSWORD>'
		click_button 'Sign in'
		expect(current_path).to eq(new_user_session_path)
	end
end
{'fraction_non_alphanumeric': 0.10709732256693583, 'fraction_numerical': 0.0008499787505312367, 'mean_word_length': 5.744985673352436, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, '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': '7630631', 'n_tokens_mistral': 829, 'n_tokens_neox': 775, 'n_words': 231}