<commit_before>require "test_helper"
include Warden::Test::Helpers

feature "CanAccessAdmin" do

  #scenario "the test is sound" do
  #  visit root_path
  #  page.must_have_content "Hello World"
  #  page.wont_have_content "Goobye All!"
  #end

  scenario "should not get /admin/resque as a anonymous user" do
    visit "/admin/resque"
    assert_equal 404, page.status_code
  end

  scenario "should not get /admin/resque as a normal user" do
    @user = FactoryGirl.create(:user)
    login_as @user
    visit "/admin/resque"
    page.must_redirect_to root_url
    assert_equal "No tienes permisos para realizar esta acción.", flash[:alert]
  end

  scenario "should get /admin/resque as admin" do
    @admin = FactoryGirl.create(:admin)
    login_as @admin
    visit "/admin/resque"
    page.must_have_content "Colas"
  end

end<commit_msg>[tests] [gems] capybara for /admin/jobs<commit_after>require "test_helper"
include Warden::Test::Helpers

feature "CanAccessAdmin" do

  #scenario "the test is sound" do
  #  visit root_path
  #  page.must_have_content "Hello World"
  #  page.wont_have_content "Goobye All!"
  #end

  scenario "should not get /admin/jobs as a anonymous user" do
    visit "/admin/jobs"
    assert_equal 404, page.status_code
  end

  scenario "should not get /admin/jobs as a normal user" do
    @user = FactoryGirl.create(:user)
    login_as @user
    visit "/admin/jobs"
    page.must_redirect_to root_url
    assert_equal "No tienes permisos para realizar esta acción.", flash[:alert]
  end

  scenario "should get /admin/jobs as admin" do
    @admin = FactoryGirl.create(:admin)
    login_as @admin
    visit "/admin/jobs"
    page.must_have_content "Colas"
  end

end
{'fraction_non_alphanumeric': 0.09305064782096584, 'fraction_numerical': 0.0035335689045936395, 'mean_word_length': 3.579514824797844, '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': '7376807', 'n_tokens_mistral': 588, 'n_tokens_neox': 568, 'n_words': 169}