Пример #1
0
    it('should fail validation if the bid isn\'t defined or not an object', function() {
      var result = spec.isBidRequestValid();

      expect(result).to.equal(false);

      result = spec.isBidRequestValid('not an object');

      expect(result).to.equal(false);
    });
Пример #2
0
 it('should return an array of bid responses', function() {
   var responses = spec.interpretResponse(serverResponse);
   expect(responses).to.be.an('array').with.length(1);
 });
Пример #3
0
 it('should build a very basic request', function() {
   var request = spec.buildRequests([bid], bidRequestObj);
   expect(request.method).to.equal('POST');
 });