<commit_before>/**
 * Copyright 2010 Ajax.org B.V.
 *
 * This product includes software developed by
 * Ajax.org B.V. (http://www.ajax.org/).
 *
 * Author: <NAME> <<EMAIL>>
 */

var assert = require("assert");
var sys = require("sys");
var GitHubApi = require("../github").GitHubApi;

var username = 'ornicar';
var repo     = 'php-github-api';

var test = module.exports = {

    setUp: function() {
        this.github = new GitHubApi(true);
        this.pullApi = this.github.getPullApi();
    },

    "test: list pull requests" : function(finished) {
        test.pullApi.getList(username, repo, function(err, pulls) {
            assert.ok(pulls.length);
            finished();
        });
    },

    "test: show pull request" : function(finished) {
        test.pullApi.show(username, repo, 1, function(err, pull) {
            assert.ok(pull.number);
            finished();
        });
    }
};

!module.parent && require("asyncjs").test.testcase(module.exports).exec();<commit_msg>fix pull api test<commit_after>/**
 * Copyright 2010 Ajax.org B.V.
 *
 * This product includes software developed by
 * Ajax.org B.V. (http://www.ajax.org/).
 *
 * Author: <NAME> <<EMAIL>>
 */

var assert = require("assert");
var sys = require("sys");
var GitHubApi = require("../github").GitHubApi;

var username = "ajaxorg";
var repo     = "ace";

var test = module.exports = {

    setUp: function() {
        this.github = new GitHubApi(true);
        this.pullApi = this.github.getPullApi();
    },

    "test: list pull requests" : function(finished) {
        test.pullApi.getList(username, repo, function(err, pulls) {
            assert.ok(pulls.length);
            finished();
        });
    },

    "test: show pull request" : function(finished) {
        test.pullApi.show(username, repo, 157, function(err, pull) {
            assert.equal(pull.number, 157);
            finished();
        });
    }
};

!module.parent && require("asyncjs").test.testcase(module.exports).exec();
{'fraction_non_alphanumeric': 0.1677581863979849, 'fraction_numerical': 0.007556675062972292, 'mean_word_length': 2.6174863387978142, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '207872', 'n_tokens_mistral': 642, 'n_tokens_neox': 607, 'n_words': 137}