{"size": 2836, "ext": "js", "max_stars_repo_path": "node_modules/github/test/searchTest.js", "max_stars_repo_name": "Wamadahama/ether", "max_stars_repo_stars_event_min_datetime": "2016-01-08T05:34:32.000Z", "max_stars_repo_stars_event_max_datetime": "2019-04-17T19:19:41.000Z", "max_issues_repo_path": "node_modules/github/test/searchTest.js", "max_issues_repo_name": "Wamadahama/ether", "max_issues_repo_issues_event_min_datetime": "2015-12-20T10:12:18.000Z", "max_issues_repo_issues_event_max_datetime": "2016-08-17T17:20:23.000Z", "max_forks_repo_path": "node_modules/github/test/searchTest.js", "max_forks_repo_name": "Wamadahama/ether", "max_forks_repo_forks_event_min_datetime": "2016-01-21T22:09:48.000Z", "max_forks_repo_forks_event_max_datetime": "2020-05-05T11:39:46.000Z"}
{"max_stars_count": 30, "max_issues_count": 64, "max_forks_count": 9, "avg_line_length": 26.0183486239, "max_line_length": 93, "alphanum_fraction": 0.4291255289}
/*
 * Copyright 2012 Cloud9 IDE, Inc.
 *
 * This product includes software developed by
 * Cloud9 IDE, Inc (http://c9.io).
 *
 * Author: Mike de Boer <info@mikedeboer.nl>
 */

"use strict";

var Assert = require("assert");
var Client = require("./../lib/index");
var testAuth = require("./../testAuth.json");

describe("[search]", function() {
    var client;
    var token = testAuth["token"];

    beforeEach(function() {
        client = new Client();
        client.authenticate({
            type: "oauth",
            token: token
        });
    });

    it("should successfully execute GET /search/code (code)",  function(next) {
        client.search.code(
            {
                q: "String",
                sort: "String",
                order: "String",
                page: "Number",
                per_page: "Number"
            },
            function(err, res) {
                Assert.equal(err, null);
                // other assertions go here
                next();
            }
        );
    });

    it("should successfully execute GET /legacy/user/email/:email (email)",  function(next) {
        client.search.email(
            {
                email: "String"
            },
            function(err, res) {
                Assert.equal(err, null);
                // other assertions go here
                next();
            }
        );
    });

    it("should successfully execute GET /search/issues (issues)",  function(next) {
        client.search.issues(
            {
                q: "String",
                sort: "String",
                order: "String",
                page: "Number",
                per_page: "Number"
            },
            function(err, res) {
                Assert.equal(err, null);
                // other assertions go here
                next();
            }
        );
    });

    it("should successfully execute GET /search/repositories (repos)",  function(next) {
        client.search.repos(
            {
                q: "String",
                sort: "String",
                order: "String",
                page: "Number",
                per_page: "Number"
            },
            function(err, res) {
                Assert.equal(err, null);
                // other assertions go here
                next();
            }
        );
    });

    it("should successfully execute GET /search/users (users)",  function(next) {
        client.search.users(
            {
                q: "String",
                sort: "String",
                order: "String",
                page: "Number",
                per_page: "Number"
            },
            function(err, res) {
                Assert.equal(err, null);
                // other assertions go here
                next();
            }
        );
    });
});
