{"size": 1563, "ext": "js", "max_stars_repo_path": "node_modules/newrelic/test/highsecurity.test.js", "max_stars_repo_name": "juliangiuca/tracker", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "node_modules/newrelic/test/highsecurity.test.js", "max_issues_repo_name": "juliangiuca/tracker", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "node_modules/newrelic/test/highsecurity.test.js", "max_forks_repo_name": "juliangiuca/tracker", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.05, "max_line_length": 82, "alphanum_fraction": 0.6557901472}
'use strict';

var path   = require('path')
  , chai   = require('chai')
  , helper = require(path.join(__dirname, 'lib', 'agent_helper.js'))
  , facts    = require(path.join(__dirname, '..', 'lib', 'collector', 'facts.js'))
  , API    = require(path.join(__dirname, '..', 'api.js'))
  ;

chai.should();

describe("high security mode", function () {
  var agent
    , api
    , factoids
    ;

  beforeEach(function () {
    agent = helper.loadMockedAgent();
    api = new API(agent);
  });

  afterEach(function () {
    helper.unloadAgent(agent);
  });

  it('should contain security_settings', function () {
    /*jshint expr:false*/
    factoids = facts(agent);
    factoids.security_settings.should.not.equal(null);
  });

  it('should record capture_params', function () {
    agent.config.capture_params = true;
    factoids = facts(agent);
    factoids.security_settings.capture_params.should.equal(true);
  });

  it('should have capture_params false by default', function () {
    factoids = facts(agent);
    factoids.security_settings.capture_params.should.equal(false);
  });

  it('should record transaction_tracer.record_sql', function () {
    agent.config.transaction_tracer.record_sql = true;
    factoids = facts(agent);
    factoids.security_settings.transaction_tracer.record_sql.should.equal(true);
  });

  it('should have transaction_tracer.record_sql off by default', function () {
    factoids = facts(agent);
    factoids
      .security_settings
      .transaction_tracer
      .record_sql
      .should
      .equal('off');
  });
});
