<commit_before>
/**
 * WPCOM module
 */

var util = require('./util');
var assert = require('assert');

/**
 * Testing data
 */

var fixture = require('./fixture');

/**
 * site.follow
 */

describe('wpcom.site.follow', function(){
  // Global instances
  var wpcom = util.wpcom();
  var site = wpcom.site(util.site());
  var follow = site.follow();

  describe('wpcom.site.follow.follow', function(){
    it('should follow site', function(done){
      follow.follow(function(err, data){
        if (err) throw err;

        assert.ok(data);
        assert.equal(true, data.is_following);

        done();
      });
    });
  });

  describe('wpcom.site.follow.unfollow', function(){
    it('should unfollow site', function(done){
      follow.unfollow(function(err, data){
        if (err) throw err;

        assert.ok(data);
        assert.equal(false, data.is_following);

        done();
      });
    });
  });

  describe('wpcom.site.follow.mine', function() {
    it('should get follow status', function(done){
      follow.mine(function(err, data){
        if (err) throw err;

        assert.ok(data);
        assert.equal(false, data.is_following);

        done();
      });
    });
  });<commit_msg>Cover tests: site.follow<commit_after>
/**
 * WPCOM module
 */

var util = require('./util');
var assert = require('assert');

/**
 * Testing data
 */

var fixture = require('./fixture');

/**
 * site.follow
 */

describe('wpcom.site.follow', function(){
  // Global instances
  var wpcom = util.wpcom();
  var site = wpcom.site(util.site());
  var follow = site.follow();

  describe('wpcom.site.follow.follow', function(){
    it('should follow site', done => {
      follow.follow()
        .then(data => {
          assert.ok(data);
          assert.equal(true, data.is_following);

          done();
        })
        .catch(done);
    });
  });

  describe('wpcom.site.follow.unfollow', function(){
    it('should unfollow site', done => {
      follow.unfollow()
        .then(data => {
          assert.ok(data);
          assert.equal(false, data.is_following);

          done();
        })
        .catch(done);
    });
  });

  describe('wpcom.site.follow.mine', function() {
    it('should get follow status', done => {
      follow.mine()
        .then(data => {
          assert.ok(data);
          assert.equal(false, data.is_following);

          done();
        })
        .catch(done);
    });
  });
{'fraction_non_alphanumeric': 0.18174342105263158, 'fraction_numerical': 0.0, 'mean_word_length': 2.3147138964577656, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '6694970', 'n_tokens_mistral': 767, 'n_tokens_neox': 742, 'n_words': 147}