Skip to content

Commit

Permalink
refactor: file model not service
Browse files Browse the repository at this point in the history
  • Loading branch information
meenahoda committed Aug 1, 2018
1 parent 8661302 commit 973e702
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const expect = require('chai').expect

const UPLOAD_FILE_STATE_MACHINE = 'tymly_uploadFile_1_0'
const FILENAME = 'fixtures/test_file.txt'
let fileService, fileId
let fileModel, fileId

describe('file upload tests', function () {
this.timeout(process.env.TIMEOUT || 5000)
Expand All @@ -25,7 +25,7 @@ describe('file upload tests', function () {
expect(err).to.eql(null)
statebox = tymlyServices.statebox
tymlyService = tymlyServices.tymly
fileService = tymlyServices.storage.models['tymly_files']
fileModel = tymlyServices.storage.models['tymly_files']
done()
}
)
Expand All @@ -48,7 +48,7 @@ describe('file upload tests', function () {
})

it('should check that the file has been uploaded', async () => {
const doc = await fileService.findById(fileId)
const doc = await fileModel.findById(fileId)

expect(doc.fileName).to.eql(FILENAME)
expect(doc.id).to.eql(fileId)
Expand Down

0 comments on commit 973e702

Please sign in to comment.