Guest User

Untitled

a guest
Oct 15th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. /*globals describe, beforeEach, it */
  2.  
  3. var should = require('should'),
  4. mockery = require('mockery'),
  5. helpers = require('./helpers'),
  6. Cache = require('../chatter-cache').ChatterCache;
  7.  
  8. describe('Chatter Cache', function() {
  9.  
  10. var proxy = null;
  11. beforeEach(function(done) {
  12. helpers.fetchProxy(function(err, data) {
  13. if (err) return done(err);
  14. proxy = data;
  15. done();
  16. });
  17. });
  18.  
  19. it('Can fetch users', function(done) {
  20. var cache = new Cache(proxy);
  21. cache.users(1, function(err, users) {
  22. if (err) return done(err);
  23. should.exist(users);
  24. users.should.have.property('length');
  25. done();
  26. });
  27. });
  28.  
  29. it('Can fetch mentions..', function(done) {
  30. var cache = new Cache(proxy);
  31. cache.mentions(1, function(err, mentions) {
  32. if (err) return done(err);
  33. should.exist(mentions);
  34. mentions.should.have.property('length');
  35. done();
  36. });
  37. });
  38.  
  39. });
Add Comment
Please, Sign In to add comment