Move auth outside of cli-modules

This commit is contained in:
Juan Cruz Viotti 2014-11-18 08:34:40 -04:00
parent dcf6215f56
commit c753e1b41b
3 changed files with 10 additions and 8 deletions

View File

@ -1,8 +1,8 @@
async = require('async')
_ = require('lodash')
server = require('../../server/server')
token = require('../../token/token')
server = require('../server/server')
token = require('../token/token')
exports.authenticate = (credentials, callback) ->
server.post '/login_', credentials, (error, response) ->

View File

@ -3,15 +3,17 @@ nock = require('nock')
_ = require('lodash')
async = require('async')
auth = require('./auth')
config = require('../../config')
mock = require('../../../tests/utils/mock')
johnDoeFixture = require('../../../tests/fixtures/johndoe')
janeDoeFixture = require('../../../tests/fixtures/janedoe')
data = require('../data/data')
config = require('../config')
mock = require('../../tests/utils/mock')
johnDoeFixture = require('../../tests/fixtures/johndoe')
janeDoeFixture = require('../../tests/fixtures/janedoe')
describe 'Auth:', ->
beforeEach ->
beforeEach (done) ->
mock.fs.init()
data.prefix.set(config.dataPrefix, done)
afterEach ->
mock.fs.restore()

View File

@ -1,7 +1,7 @@
program = require('commander')
packageJSON = require('../../package.json')
auth = require('../cli-modules/auth/auth')
auth = require('../auth/auth')
data = require('../data/data')
server = require('../server/server')
config = require('../config')