Rename config.baseUrl to config.remoteUrl

This commit is contained in:
Juan Cruz Viotti 2014-11-18 08:53:07 -04:00
parent d0cc3e54ad
commit 2fd2b702ae
4 changed files with 7 additions and 7 deletions

View File

@ -21,7 +21,7 @@ describe 'Auth:', ->
describe 'given valid credentials', ->
beforeEach ->
nock(config.baseUrl)
nock(config.remoteUrl)
.post('/login_', johnDoeFixture.credentials)
.reply(200, johnDoeFixture.token)
@ -62,7 +62,7 @@ describe 'Auth:', ->
describe 'given invalid credentials', ->
beforeEach ->
nock(config.baseUrl)
nock(config.remoteUrl)
.post('/login_')
.reply(401)
@ -87,11 +87,11 @@ describe 'Auth:', ->
describe 'given a logged in user', ->
beforeEach (done) ->
nock(config.baseUrl)
nock(config.remoteUrl)
.post('/login_', johnDoeFixture.credentials)
.reply(200, johnDoeFixture.token)
nock(config.baseUrl)
nock(config.remoteUrl)
.post('/login_', janeDoeFixture.credentials)
.reply(200, janeDoeFixture.token)

View File

@ -3,5 +3,5 @@ path = require('path')
module.exports =
# TODO: Should be configurable
baseUrl: 'https://staging.resin.io'
remoteUrl: 'https://staging.resin.io'
dataPrefix: path.join(process.env.HOME, '.resin')

View File

@ -6,7 +6,7 @@ token = require('../token/token')
exports.request = (method = 'GET', url, json, callback) ->
method = method.toUpperCase()
url = urljoin(config.baseUrl, url)
url = urljoin(config.remoteUrl, url)
async.waterfall [

View File

@ -6,7 +6,7 @@ token = require('../token/token')
mock = require('../../tests/utils/mock')
johnDoeFixture = require('../../tests/fixtures/johndoe.json')
TEST_URI = config.baseUrl
TEST_URI = config.remoteUrl
URI =
ok: '/ok'