UNPKG

864 BJavaScriptView Raw
1/*
2 * search-test.js: Tests for Loggly search requests
3 *
4 * (C) 2010 Charlie Robbins
5 * MIT LICENSE
6 *
7 */
8
9var path = require('path'),
10 vows = require('vows'),
11 assert = require('assert'),
12 helpers = require('./helpers');
13
14var options = {},
15 testContext = {},
16 config = helpers.loadConfig(),
17 loggly = require('../lib/loggly').createClient(config);
18
19vows.describe('node-loggly/customer').addBatch({
20 "When using the node-loggly client": {
21 "the customer() method": {
22 topic: function () {
23 loggly.customer(this.callback);
24 },
25 "should return a valid customer": function (err, customer) {
26 assert.isNull(err);
27 assert.isArray(customer.tokens);
28 assert.isString(customer.subdomain);
29 assert.isObject(customer.subscription);
30 }
31 }
32 }
33}).export(module);
\No newline at end of file