<commit_before>require 'rails_helper'

describe "Account page" do	
	before do
		# Sign in
		@user = User.create!(username: 'Larry', email: '<EMAIL>', password: 'password', digest_subscriber: 'true')
		visit '/sign_in'
		fill_in 'Email', with: '<EMAIL>'
		fill_in 'Password', with: 'password'
		click_button 'Sign in'

		# Go to account page
		visit '/account'
	end

	it "allows user to edit his profile" do
		fill_in('Display Name', :with => 'John')
		fill_in('Email', :with => '<EMAIL>')
		click_button 'Save'
		expect(page).to have_content "Your information was successfully saved"
	end	

  it "saves user's data correctly" do
    fill_in('Display Name', :with => 'John')
    click_button 'Save'
    @user.reload
    expect(@user.username).to eq 'John'
    expect(@user.digest_subscriber).to be true
  end
end<commit_msg>fix the spaces in the text redactor<commit_after>require 'rails_helper'

describe "Account page" do
  before do
    # Sign in
    @user = User.create!(username: 'Larry', email: '<EMAIL>', password: 'password', digest_subscriber: 'true')
    visit '/sign_in'
    fill_in 'Email', with: '<EMAIL>'
    fill_in 'Password', with: 'password'
    click_button 'Sign in'

    # Go to account page
    visit '/account'
  end

  it "allows user to edit his profile" do
    fill_in('Display Name', :with => 'John')
    fill_in('Email', :with => '<EMAIL>')
    click_button 'Save'
    expect(page).to have_content "Your information was successfully saved"
  end 

  it "saves user's data correctly" do
    fill_in('Display Name', :with => 'John')
    click_button 'Save'
    @user.reload
    expect(@user.username).to eq 'John'
    expect(@user.digest_subscriber).to be true
  end
end
{'fraction_non_alphanumeric': 0.13451327433628318, 'fraction_numerical': 0.0, 'mean_word_length': 3.8735632183908044, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '2118126', 'n_tokens_mistral': 577, 'n_tokens_neox': 549, 'n_words': 175}