Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created March 24, 2016 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/a8e3390d17052860157a to your computer and use it in GitHub Desktop.
Save tmcw/a8e3390d17052860157a to your computer and use it in GitHub Desktop.
styleClient.test('#createStyle', function(assert) {
var client = new MapboxClient(process.env.MapboxAccessToken);
assert.ok(client, 'created style client');
newStyleFixture.glyphs = newStyleFixture.glyphs
.replace('{owner}', client.owner);
client.createStyle(newStyleFixture, function(err, style) {
assert.ifError(err, 'success');
assert.ok(style.id, 'returned style has a valid id');
newStyleId = style.id;
assert.end();
});
});
styleClient.test('#retrieveStyle', function(assert) {
var client = new MapboxClient(process.env.MapboxAccessToken);
assert.ok(client, 'created style client');
client.readStyle(newStyleId, function(err, style) {
assert.ifError(err, 'success');
assert.ok(style.id, 'returned style has a valid id');
assert.end();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment