<commit_before>var expect = require('chai').expect;
var request = require('request');

describe('REST API - GET', function(){

  it('Can get the beacons for a device id', function(done) {
    var deviceId = 999;

    request('http://localhost:8080/api/devices/'+deviceId+'/beacons', function(error, res, body) {
      expect(res.statusCode).to.equal(200);
      done();
    });
  });

  it('Can get the beacons for a device id', function(done) {
    var participantId = 1;

    request('http://localhost:8080/api/participants/'+participantId+'/events', function(error, res, body) {
      expect(res.statusCode).to.equal(200);
      done();
    });
  });

  it('Can get event participants for a given eventId', function(done) {
    var eventId = 1;

    request('http://localhost:8080/api/participants/'+eventId+'/events', function(error, res, body) {
      expect(res.statusCode).to.equal(200);
      done();
    });
  });

  it('Can get the event info for any events happening within 1 hour of now for a given participant', function(done) {
    var eventId = 1;

    request('http://localhost:8080/api/participants/'+eventId+'/events/current', function(error, res, body) {
      expect(body.match(/Error/g)).to.equal(null);
      done();
    });
  });

  it('Can get all events for a given admin ID', function(done) {
    var adminId = 1;

    request('http://localhost:8080/api/admins/'+adminId+'/events', function(error, res, body) {
      expect(res.statusCode).to.equal(200);
      done();
    });
  });

  it('Can get the admin name for a given admin ID', function(done) {
    var adminId = 1;

    request('http://localhost:8080/api/admins/'+adminId, function(error, res, body) {
      expect(res.statusCode).to.equal(200);
      done();
    });
  });

  it('Can get the participant info for a given device ID', function(done) {
    var deviceId = 999;

    request('http://localhost:8080/api/devices/'+deviceId+'/participant', function(error, res, body) {
      expect(res.statusCode).to.equal(200);
      done();
    });
  });

  it('Can get the checkin status for a given device and event', function(done) {
    var deviceId = 999;
    var eventId = 1;

    request('http://localhost:8080/api/devices/'+deviceId+'/events/'+eventId+'/status', function(error, res, body) {
      expect(res.statusCode).to.equal(200);
      done();
    });
  });

  it('Can get all the beacons for a given admin', function(done) {
    var adminId = 1;

    request('http://localhost:8080/api/admins/'+adminId+'/beacons', function(error, res, body) {
      expect(res.statusCode).to.equal(200);
      done();
    });
  });



});
<commit_msg>Fixed gulp errors<commit_after>var expect = require('chai').expect;
var request = require('request');

describe('REST API - GET', function() {

  it('Can get the beacons for a device id', function(done) {
    var deviceId = 999;
    var url = 'http://localhost:8080/api/devices/' + deviceId + '/beacons';

    request(url, function(error, res, body) {
      expect(res.statusCode).to.equal(200);
      done();
    });
  });

  it('Can get the beacons for a device id', function(done) {
    var participantId = 1;
    var url = 'http://localhost:8080/api/participants/' + participantId + '/events';

    request(url, function(error, res, body) {
      expect(res.statusCode).to.equal(200);
      done();
    });
  });

  it('Can get event participants for a given eventId', function(done) {
    var eventId = 1;
    var url = 'http://localhost:8080/api/participants/' + eventId + '/events';

    request(url, function(error, res, body) {
      expect(res.statusCode).to.equal(200);
      done();
    });
  });

  it('Can get the current event for a participant', function(done) {
    var eventId = 1;
    var url = 'http://localhost:8080/api/participants/' + eventId + '/events/current';

    request(url, function(error, res, body) {
      expect(body.match(/Error/g)).to.equal(null);
      done();
    });
  });

  it('Can get all events for a given admin ID', function(done) {
    var adminId = 1;
    var url = 'http://localhost:8080/api/admins/' + adminId + '/events';
    request(url, function(error, res, body) {
      expect(res.statusCode).to.equal(200);
      done();
    });
  });

  it('Can get the admin name for a given admin ID', function(done) {
    var adminId = 1;
    var url = 'http://localhost:8080/api/admins/' + adminId;

    request(url, function(error, res, body) {
      expect(res.statusCode).to.equal(200);
      done();
    });
  });

  it('Can get the participant info for a given device ID', function(done) {
    var deviceId = 999;
    var url = 'http://localhost:8080/api/devices/' + deviceId + '/participant';

    request(url, function(error, res, body) {
      expect(res.statusCode).to.equal(200);
      done();
    });
  });

  it('Can get the checkin status for a given device and event', function(done) {
    var deviceId = 999;
    var eventId = 1;
    var url = 'http://localhost:8080/api/devices/' + deviceId + '/events/' + eventId + '/status';

    request(url, function(error, res, body) {
      expect(res.statusCode).to.equal(200);
      done();
    });
  });

  it('Can get all the beacons for a given admin', function(done) {
    var adminId = 1;
    var url = 'http://localhost:8080/api/admins/' + adminId + '/beacons';

    request(url, function(error, res, body) {
      expect(res.statusCode).to.equal(200);
      done();
    });
  });

});
{'fraction_non_alphanumeric': 0.17259819288216854, 'fraction_numerical': 0.02821316614420063, 'mean_word_length': 3.1153262518968132, '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': '2068965', 'n_tokens_mistral': 1892, 'n_tokens_neox': 1716, 'n_words': 426}