mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 21:57:51 +00:00
Move auth outside of cli-modules
This commit is contained in:
parent
dcf6215f56
commit
c753e1b41b
@ -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) ->
|
@ -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()
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user