<commit_before># test.rb
require_relative '../../app.rb'
require_relative '../helpers/test_helper.rb'

class AuthenticationTest < MiniTest::Test

  include Rack::Test::Methods

  include Capybara::DSL

  def setup
    User.destroy_all
    User.create(:name => "testuser892", :user_name=>"testuser892", :email=>"<EMAIL>", :password=>"<PASSWORD>")
  end

  def test_signup_with_blank_fields
    visit '/signup'
    click_button('Submit')
    assert page.has_content?('Error in signup'), "Test failed, Sign up with blank fields should not work"
  end

  def test_signup_with_already_existing_user
    visit '/signup'
    page.fill_in 'name', :with =>"test"
    page.fill_in 'user_name', :with => 'testuser892'
    page.fill_in 'email', :with => '<EMAIL>'
    page.fill_in 'password', :with => '<PASSWORD>'
    click_button('Submit')
    assert page.has_content?('Error in signup'), "Test failed, Sign up with already existing user and email should not work"
  end

  def test_signin_with_blank_fields
    visit '/login'
    click_button('Login')
    assert page.has_content?('Wrong password or user doesnot exists'), "Test failed, Sign in with blank fields should not work"
  end

end<commit_msg>small bug fix in authentication test<commit_after># test.rb
require_relative '../../app.rb'
require_relative '../helpers/test_helper.rb'

class AuthenticationTest < MiniTest::Test

  include Rack::Test::Methods

  include Capybara::DSL

  def setup
    visit '/logout'
    User.destroy_all
    User.create(:name => "testuser892", :user_name=>"testuser892", :email=>"<EMAIL>", :password=>"<PASSWORD>")
  end

  def test_signup_with_blank_fields
    visit '/signup'
    click_button('Submit')
    assert page.has_content?('Error in signup'), "Test failed, Sign up with blank fields should not work"
  end

  def test_signup_with_already_existing_user
    visit '/signup'
    page.fill_in 'name', :with =>"test"
    page.fill_in 'user_name', :with => 'testuser892'
    page.fill_in 'email', :with => '<EMAIL>'
    page.fill_in 'password', :with => '<PASSWORD>'
    click_button('Submit')
    assert page.has_content?('Error in signup'), "Test failed, Sign up with already existing user and email should not work"
  end

  def test_signin_with_blank_fields
    visit '/login'
    click_button('Login')
    assert page.has_content?('Wrong password or user doesnot exists'), "Test failed, Sign in with blank fields should not work"
  end

end
{'fraction_non_alphanumeric': 0.1263894606834088, 'fraction_numerical': 0.007410456978180321, 'mean_word_length': 4.317286652078774, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 27, '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': '4101521', 'n_tokens_mistral': 787, 'n_tokens_neox': 766, 'n_words': 216}