Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Duplicate CRUD Test - Profile Picture
Browse files Browse the repository at this point in the history
Removes a duplicate User CRUD test for Profile Picture.

There are two reasons for this commit.

1) Duplicate of
https://github.com/meanjs/mean/blob/master/modules/users/tests/server/user.server.routes.tests.js#L833-L848
2) This test is problematic in Windows environment.
Related to:
ladjs/supertest#230
ladjs/supertest#258

The latter may be an issue with the `.attach` method not completely
loading the file into memory before the 400 status response is sent back
due to no User logged in.
  • Loading branch information
mleanos committed Oct 29, 2015
1 parent d7d1d64 commit a871c92
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions modules/users/tests/server/user.server.routes.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -876,16 +876,6 @@ describe('User CRUD tests', function () {
});
});

it('should not be able to change profile picture if not signed in', function (done) {
agent.post('/api/users/picture')
.attach('newProfilePicture', './modules/users/client/img/profile/default.png')
.send(credentials)
.expect(400)
.end(function (userInfoErr, userInfoRes) {
done(userInfoErr);
});
});

it('should not be able to change profile picture if attach a picture with a different field name', function (done) {
agent.post('/api/auth/signin')
.send(credentials)
Expand Down

0 comments on commit a871c92

Please sign in to comment.