<commit_before>require 'spec_helper'

describe "layouts/application.html.erb" do
  it "renders site title" do
    render
    rendered.should contain 'Harrow Community Network' 
  end

  #Changed the following two to look for sig in and sign up forms instead of links
  it "renders Organization sign in link" do
    render
    rendered.should have_selector("form", :id => "loginForm")
  end

  it "renders new Organization sign up link" do
    render
    rendered.should have_selector("form", :id => "registerForm")
  end
end
<commit_msg>Tightened up specs to include particulars of sign-up and sign-in form inputs<commit_after>require 'spec_helper'

describe "layouts/application.html.erb" do
 context "no user signed-in" do

    before :each do
      view.stub(:user_signed_in?).and_return(false)
    end
    it "renders site title" do
      render
      rendered.should contain 'Harrow Community Network'
    end

    #Changed the following two to look for sig in and sign up forms instead of links
    it "renders Organization sign in form" do
      render
      rendered.should have_selector("form", :id => "loginForm")
    end

    it 'renders sign in form fields correctly' do
       render
       rendered.should have_css("#loginForm input#user_password")
       rendered.should have_css("#loginForm input#user_email")
       rendered.should have_css("#loginForm input#signin")
    end

    it "renders new Organization sign up form" do
      render
      rendered.should have_selector("form", :id => "registerForm")
    end

    it 'renders sign up form fields correctly' do
      render
      rendered.should have_css("#registerForm input#signup_password")
      rendered.should have_css("#registerForm input#signup_email")
      rendered.should have_css("#registerForm input#signup_password_confirmation")
      rendered.should have_css("#registerForm div input[value=\"Sign up\"]")
    end
 end
end

{'fraction_non_alphanumeric': 0.08219895287958115, 'fraction_numerical': 0.0, 'mean_word_length': 3.55, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5823502', 'n_tokens_mistral': 540, 'n_tokens_neox': 528, 'n_words': 187}