Skip to content

Commit c33c032

Browse files
authored
Merge pull request #1 from bamapookie/patch-2
Fix test to match new URL
2 parents 8091efd + 986c91e commit c33c032

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

test/common/util.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
var assert = require('assert');
2020
var duplexify;
2121
var extend = require('extend');
22+
var format = require('string-format-obj');
2223
var googleAuth = require('google-auto-auth');
2324
var is = require('is');
2425
var mockery = require('mockery-next');
@@ -109,14 +110,17 @@ describe('common/util', function() {
109110
});
110111

111112
it('should export an error for module instantiation errors', function() {
112-
var missingProjectIdError = new Error([
113+
var errorMessage = format([
113114
'Sorry, we cannot connect to Google Cloud Services without a project ID.',
114115
'You may specify one with an environment variable named',
115-
'"GCLOUD_PROJECT".',
116-
'See https://googlecloudplatform.github.io/gcloud-node/#/authentication',
117-
'for a detailed guide on creating an authenticated connection.'
118-
].join(' '));
116+
'"GCLOUD_PROJECT". See {baseUrl}/{path} for a detailed guide on creating',
117+
'an authenticated connection.'
118+
].join(' '), {
119+
baseUrl: 'https://googlecloudplatform.github.io/gcloud-node/#',
120+
path: '/docs/guides/authentication'
121+
});
119122

123+
var missingProjectIdError = new Error(errorMessage);
120124
assert.deepEqual(util.missingProjectIdError, missingProjectIdError);
121125
});
122126

0 commit comments

Comments
 (0)