<commit_before>/* eslint-env mocha */
const redisMock = require('redis-mock');
const chai = require('chai');
chai.should();

const db = {
  redis: redisMock.createClient(),
};
const fakeRedis = redisMock.createClient();
const wmata = require('../../controllers/wmata.js')(db);

describe('WMATA Controllers - ', () => {
  it('Method get_metadata() should acquire rail metadata.', (done) => {
    wmata.get_metadata(() => {
      let value = fakeRedis.get('wmata_metadata');
      done();
    });
  });
  it('Method get_stations_list() should acquire rail metadata.', (done) => {
    wmata.get_stations_list('RD', () => {
      let value = fakeRedis.get('wmata_line_RD');
      done();
    });
  });
  it('Method get_stations_status() should acquire rail metadata.', (done) => {
    wmata.get_stations_status(() => {
      let value = fakeRedis.get('wmata_metadata');
      done();
    });
  });
});
<commit_msg>Fix up wmata controller tests<commit_after>/* eslint-env mocha */
const redisMock = require('redis-mock');
const chai = require('chai');
chai.should();

const db = {
  redis: redisMock.createClient(),
};
const fakeRedis = redisMock.createClient();
const wmata = require('../../controllers/wmata.js')(db);

describe('WMATA Controllers - ', () => {
  it('Method get_metadata() should acquire rail metadata.', (done) => {
    wmata.get_metadata(() => {
      let value = db.redis.get('wmata_metadata');
      done();
    });
  });
  it('Method get_stations_list() should acquire rail metadata.', (done) => {
    wmata.get_stations_list('RD', () => {
      let value = db.redis.get('wmata_line_RD');
      done();
    });
  });
  it('Method get_stations_status() should acquire rail metadata.', (done) => {
    wmata.get_stations_status(() => {
      let value = db.redis.get('wmata_realtime_status');
      done();
    });
  });
});

{'fraction_non_alphanumeric': 0.19293478260869565, 'fraction_numerical': 0.0, 'mean_word_length': 3.6256281407035176, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '7569976', 'n_tokens_mistral': 619, 'n_tokens_neox': 612, 'n_words': 120}