Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Alino committed Aug 28, 2018
1 parent db905d5 commit 35f1a03
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/integration/controllers/AssetController.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var _ = require('lodash');

describe('AssetController', function () {

describe('POST /job/:parentid/asset/uploadfile', function () {
describe('POST /jobs/:parentid/assets/uploadfile', function () {
beforeEach(function (done) {
const cb = () => Job.create({
id: 1,
Expand All @@ -21,7 +21,7 @@ describe('AssetController', function () {

it('should handle file upload and asset creation', function (done) {
request(sails.hooks.http.app)
.post('/job/1/asset/uploadfile')
.post('/jobs/1/assets/uploadfile')
.field('sourceLanguage', 'en')
.field('encoding', 'utf8')
.attach('asset', 'test/fixtures/testAssetFile.txt')
Expand Down
4 changes: 2 additions & 2 deletions test/integration/controllers/JobController.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ describe('JobController', function() {
sails.emit('hook:orm:reload');
})

describe('GET /job', function() {
describe('GET /jobs', function() {
it('should return all Jobs', function (done) {
request(sails.hooks.http.app)
.get('/job')
.get('/jobs')
.expect(200)
.then((response) => {
expect(response.body).toEqual([]);
Expand Down
4 changes: 2 additions & 2 deletions test/integration/controllers/TaskController.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('TaskController', function () {
type: 'translation'
}]
}
describe('POST /asset/:parentid/task/:id/uploaddeliverable', function () {
describe('POST /assets/:parentid/tasks/:id/uploaddeliverable', function () {
beforeEach(function (done) {
const cb = () => Job.create(fixtures.jobs[0]).then(() => {
return Asset.create(fixtures.assets[0])
Expand All @@ -38,7 +38,7 @@ describe('TaskController', function () {
it('should upload the deliverable file to an existing Task', function (done) {

request(sails.hooks.http.app)
.post('/asset/1/task/1/uploaddeliverable')
.post('/assets/1/tasks/1/uploaddeliverable')
.attach('deliverable', 'test/fixtures/testDeliverableFile.txt')
.expect(200)
.then((response) => {
Expand Down

0 comments on commit 35f1a03

Please sign in to comment.