Skip to content

Commit

Permalink
[fix] Small fixes after rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero committed Feb 12, 2013
1 parent 529fb1c commit 7c32ea0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 23 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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",
Expand Down
14 changes: 2 additions & 12 deletions test/commands/apps-test.js
Expand Up @@ -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() {
Expand Down Expand Up @@ -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',
Expand All @@ -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')
Expand Down
20 changes: 10 additions & 10 deletions test/commands/tokens-test.js
Expand Up @@ -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' });
})
Expand Down

0 comments on commit 7c32ea0

Please sign in to comment.