[ Launch: ordinal color scales ] 680bdeae199e6597b07e by jedwood
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var token = false; | |
/** | |
* Set the token. | |
* | |
* @param {string} Slack API token; | |
*/ | |
function setToken(t){ | |
token = t; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>SVG Lines</title> | |
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> | |
<script src="belay.js"></script> | |
<link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> | |
<style> | |
body{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('/blog', function() { | |
it('returns blog posts as JSON', function(done) { | |
api.get('/blog') | |
.set('x-api-key', '123myapikey') | |
.auth('correct', 'credentials') | |
.expect(200) | |
.expect('Content-Type', /json/) | |
.end(function(err, res) { | |
if (err) return done(err); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Authentication', function() { | |
it('errors if wrong basic auth', function(done) { | |
api.get('/blog') | |
.set('x-api-key', '123myapikey') | |
.auth('incorrect', 'credentials') | |
.expect(401, done) | |
}); | |
it('errors if bad x-api-key header', function(done) { |