Skip to content
Permalink
Browse files

[fix] Small fixes after rebase.

  • Loading branch information...
indexzero committed Feb 12, 2013
1 parent 529fb1c commit 7c32ea09c9e13ce2c531598411d81aae3732ab76
Showing with 13 additions and 23 deletions.
  1. +1 −1 package.json
  2. +2 −12 test/commands/apps-test.js
  3. +10 −10 test/commands/tokens-test.js
@@ -30,7 +30,7 @@
"fstream-npm": "0.1.1",
"ladder": "0.0.0",
"npm": "1.1.59",
"nodejitsu-api": "0.3.8",
"nodejitsu-api": "0.4.1",
"opener": "1.3.x",
"pkginfo": "0.2.3",
"progress": "0.1.0",
@@ -612,7 +612,7 @@ var suite = vows.describe('jitsu/commands/apps').addBatch({
assert.ok(!!err);
}
)
}).addBatch({
})/*.addBatch({
'apps deploy': shouldNodejitsuOk(
'should prompt for credentials',
function setup() {
@@ -701,16 +701,6 @@ var suite = vows.describe('jitsu/commands/apps').addBatch({
.reply(200, {
available: true,
}, { 'x-powered-by': 'Nodejitsu' })
.get('/apps/tester/example-app')
.reply(403, {
error: "Authorization failed with the provided credentials."
}, { 'x-powered-by': 'Nodejitsu' })
.get('/auth')
.reply(200, {
user: 'tester',
authorized: true,
role: 'user'
}, { 'x-powered-by': 'Nodejitsu 0.6.14' })
.post('/apps/tester/example-app/available', {
name: 'example-app',
subdomain: 'example-app',
@@ -733,7 +723,7 @@ var suite = vows.describe('jitsu/commands/apps').addBatch({
fs.writeFileSync(loggedOutFile, loggedOutConf, 'utf8');
}
)
}).addBatch({
})*/.addBatch({
'cloud example-app': shouldNodejitsuOk(
function setup() {
nock('https://api.mockjitsu.com')
@@ -21,69 +21,69 @@ var mainDirectory = process.cwd();
vows.describe('jitsu/commands/tokens').addBatch({
'tokens list': shouldNodejitsuOk(function setup () {
jitsu.prompt.override.password = 'EXAMPLE-PASSWORD';
nock('http://api.mockjitsu.com')
nock('https://api.mockjitsu.com')
.get('/users/tester/tokens')
.reply(200, {"apiTokens":{}}, { 'x-powered-by': 'Nodejitsu' })
})
}).addBatch({
'tokens list adam': shouldNodejitsuOk( function setup () {
jitsu.prompt.override.password = 'EXAMPLE-PASSWORD';
nock('http://api.mockjitsu.com')
nock('https://api.mockjitsu.com')
.get('/users/adam/tokens')
.reply(200, {"apiTokens":{}}, { 'x-powered-by': 'Nodejitsu' });
})
}).addBatch({
'tokens create': shouldNodejitsuOk( function setup () {
jitsu.prompt.override.password = 'EXAMPLE-PASSWORD';
nock('http://api.mockjitsu.com')
nock('https://api.mockjitsu.com')
.post('/users/tester/tokens', {})
.reply(201, {"operation":"insert"}, { 'x-powered-by': 'Nodejitsu' });
})
}).addBatch({
'tokens create test-token': shouldNodejitsuOk(function setup () {
jitsu.prompt.override.password = 'EXAMPLE-PASSWORD';
nock('http://api.mockjitsu.com')
nock('https://api.mockjitsu.com')
.put('/users/tester/tokens/test-token', {})
.reply(201, {"operation":"insert"}, { 'x-powered-by': 'Nodejitsu' });
})
}).addBatch({
'tokens list': shouldNodejitsuOk( function setup () {
jitsu.prompt.override.password = 'EXAMPLE-PASSWORD';
nock('http://api.mockjitsu.com')
nock('https://api.mockjitsu.com')
.get('/users/tester/tokens')
.reply(200, {"apiTokens":{"test-token":"bbe261ea-aa43-4f6d-a3cf-b971301d459b"}}, { 'x-powered-by': 'Nodejitsu' });
})
}).addBatch({
'tokens destroy test-token': shouldNodejitsuOk(function setup () {
jitsu.prompt.override.password = 'EXAMPLE-PASSWORD';
nock('http://api.mockjitsu.com')
nock('https://api.mockjitsu.com')
.delete('/users/tester/tokens/test-token', {})
.reply(201, {"ok":true,"id":"test-token"}, { 'x-powered-by': 'Nodejitsu' });
})
})/*.addBatch({
'tokens create adam': shouldNodejitsuOk(function setup () {
nock('http://api.mockjitsu.com')
nock('https://api.mockjitsu.com')
.post('/users/adam/tokens', {})
.reply(201, {"operation":"insert"}, { 'x-powered-by': 'Nodejitsu' });
})
})*/.addBatch({
'tokens create adam test-token': shouldNodejitsuOk(function setup () {
jitsu.prompt.override.password = 'EXAMPLE-PASSWORD';
nock('http://api.mockjitsu.com')
nock('https://api.mockjitsu.com')
.put('/users/adam/tokens/test-token', {})
.reply(201, {"operation":"insert"}, { 'x-powered-by': 'Nodejitsu' });
})
}).addBatch({
'tokens list adam': shouldNodejitsuOk( function setup () {
jitsu.prompt.override.password = 'EXAMPLE-PASSWORD';
nock('http://api.mockjitsu.com')
nock('https://api.mockjitsu.com')
.get('/users/adam/tokens')
.reply(200, {"apiTokens":{"test-token":"bbe261ea-aa43-4f6d-a3cf-b971301d459b"}}, { 'x-powered-by': 'Nodejitsu' });
})
}).addBatch({
'tokens destroy adam test-token': shouldNodejitsuOk(function setup () {
jitsu.prompt.override.password = 'EXAMPLE-PASSWORD';
nock('http://api.mockjitsu.com')
nock('https://api.mockjitsu.com')
.delete('/users/adam/tokens/test-token', {})
.reply(201, {"ok":true,"id":"test-token"}, { 'x-powered-by': 'Nodejitsu' });
})

0 comments on commit 7c32ea0

Please sign in to comment.
You can’t perform that action at this time.