<commit_before>require 'spec_helper'

RSpec.describe "layouts/_toolbar.html.slim", type: :view do

  include Devise::TestHelpers

  let(:user)          { FactoryGirl.create :user }
  let(:admin_user)    { FactoryGirl.create :admin_user }

  it 'should contain our header' do
    render
    expect(rendered).to include('Home')
  end

  context 'logged out user' do

    it 'should not show offices' do
      render
      expect(rendered).to_not include('Offices')
    end

    it 'should not show admin' do
      render
      expect(rendered).to_not include('Admin')
    end
  end

  context 'logged in as user' do

    before(:each) { sign_in user }

    it 'should not offices' do
      render
      expect(rendered).to  include('Offices')
    end

    it 'should show not admin' do
      render
      expect(rendered).to_not include('Admin')
    end
  end
  context 'logged in as admin' do

    before(:each) { sign_in admin_user }

    it 'should show offices' do
      render
      expect(rendered).to include('Offices')
    end

    it 'should show not admin' do<commit_msg>corrected labels of specs to make sense<commit_after>require 'spec_helper'

RSpec.describe "layouts/_toolbar.html.slim", type: :view do

  include Devise::TestHelpers

  let(:user)          { FactoryGirl.create :user }
  let(:admin_user)    { FactoryGirl.create :admin_user }

  it 'should contain our header' do
    render
    expect(rendered).to include('Home')
  end

  context 'logged out user' do

    it 'should not see offices' do
      render
      expect(rendered).to_not include('Offices')
    end

    it 'should not see admin' do
      render
      expect(rendered).to_not include('Admin')
    end
  end

  context 'logged in user' do

    before(:each) { sign_in user }

    it 'should see offices' do
      render
      expect(rendered).to  include('Offices')
    end

    it 'should not see admin' do
      render
      expect(rendered).to_not include('Admin')
    end
  end
  context 'logged in as admin' do

    before(:each) { sign_in admin_user }

    it 'should see offices' do
      render
      expect(rendered).to include('Offices')
    end

    it 'should see admin' do
{'fraction_non_alphanumeric': 0.09392265193370165, 'fraction_numerical': 0.0, 'mean_word_length': 2.7145299145299147, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5386713', 'n_tokens_mistral': 696, 'n_tokens_neox': 650, 'n_words': 211}