<commit_before>#
# -*- indent-level: 4;indent-tabs-mode: nil; fill-column: 92 -*-
# ex: ts=4 sw=4 et
#
# Author:: <NAME> (<<EMAIL>>)
# Copyright:: Copyright (c) 2012 Opscode, Inc.
#

describe "pushy status" do
  describe 'access control' do
    context 'GET /_status' do

      let(:path) { api_url("/_status").gsub(/organizations\/.*\//, '/pushy') }

      it 'returns a 200 ("OK") for admin' do
        get(path, admin_user) do |response|
          response.should look_like({
                                      :status => 200
                                    })
        end
      end

      it 'returns a 200 ("OK") for normal user' do
        get(path, normal_user) do |response|
          response.should look_like({
                                      :status => 200
                                    })
        end<commit_msg>change /_status endpoint to /pushy/_status<commit_after>#
# -*- indent-level: 4;indent-tabs-mode: nil; fill-column: 92 -*-
# ex: ts=4 sw=4 et
#
# Author:: <NAME> (<<EMAIL>>)
# Copyright:: Copyright (c) 2012 Opscode, Inc.
#

describe "pushy status" do
  describe 'access control' do
    context 'GET /pushy/_status' do

      let(:path) { api_url("/_status").gsub(/organizations\/.*\//, '/pushy/') }

      it 'returns a 200 ("OK") for admin' do
          pp path
        get(path, admin_user) do |response|
          response.should look_like({
                                      :status => 200
                                    })
        end
      end

      it 'returns a 200 ("OK") for normal user' do
        get(path, normal_user) do |response|
          response.should look_like({
                                      :status => 200
                                    })
        end
{'fraction_non_alphanumeric': 0.1339080459770115, 'fraction_numerical': 0.02413793103448276, 'mean_word_length': 1.487142857142857, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4622524', 'n_tokens_mistral': 546, 'n_tokens_neox': 497, 'n_words': 145}