UNPKG

github

Version:
126 lines (115 loc) 3.32 kB
/* * 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 /search/commits (commits)", function(next) { client.search.commits( { 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(); } ); }); });