<commit_before>require 'rails_helper'

describe "Calendar", js: true do
  let!(:user) { FactoryGirl.create :user }
  context "with a logged in user" do
    before(:each) do
        visit new_session_path
        fill_in "Username", with: user.username
        fill_in "Password", with: <PASSWORD>
        click_on "Log In"
        visit calendars_path
    end
    it "should display a notice to the user" do
      expect(page).to have_content("Add or make changes to events through google calendar.")
    end
    it "should display a create button" do
      within("form#new_calendar") do
        expect(page).to have_button("Create")
      end
    end
    xit "should display a calendar event and a refresh button" do

    end<commit_msg>Calendars feature complete.<commit_after>require 'rails_helper'

describe "Calendar with empty database", js: true do
  let!(:user) { FactoryGirl.create :user }
  context "with a logged in user" do
    before(:each) do
        visit new_session_path
        fill_in "Username", with: user.username
        fill_in "Password", with: <PASSWORD>
        click_on "Log In"
        visit calendars_path
    end
    it "should display a notice to the user" do
      expect(page).to have_content("Add or make changes to events through google calendar.")
    end
    it "should display a create button" do
      within("form#new_calendar") do
        expect(page).to have_button("Create")
      end
    end
  end
end
describe "Calendar with items in database", js: true do
  let!(:user) { FactoryGirl.create :user }
  let!(:calendar) { FactoryGirl.create :calendar }
  let(:attributes) { FactoryGirl.attributes_for :calendar }
  context "with a logged in user" do
    before(:each) do
        visit new_session_path
        fill_in "Username", with: user.username
        fill_in "Password", with: <PASSWORD>
        click_on "Log In"
        visit calendars_path
    end
    it "should display a calendar event" do
      expect(page).to have_content(calendar.summary)
    end
    it "should display a refresh button" do
      within("form#new_calendar") do
        expect(page).to have_button("Refresh")
      end
    end
{'fraction_non_alphanumeric': 0.08732001857872736, 'fraction_numerical': 0.0, 'mean_word_length': 2.9378427787934185, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '6250372', 'n_tokens_mistral': 625, 'n_tokens_neox': 612, 'n_words': 220}