Adjust stying of put test

This commit is contained in:
Blade Barringer
2015-10-26 08:04:30 -05:00
parent cf7be0b7a3
commit 0eac953170

View File

@@ -6,22 +6,18 @@ import {
describe('PUT /user', () => {
let api, user;
beforeEach((done) => {
generateUser().then((usr) => {
beforeEach(() => {
return generateUser().then((usr) => {
user = usr;
api = requester(usr);
done();
}).catch(done);
api = requester(user);
});
});
it("updates the user", () => {
let api = requester(user);
return api.get('/user')
.then((fetchedUser) => {
return api.put("/user", {"profile.name" : "Frodo"});
})
.then((updatedUser) => {
expect(updatedUser.profile.name).to.eql("Frodo");
it('updates the user', () => {
return api.put('/user', {
'profile.name' : 'Frodo',
}).then((updatedUser) => {
expect(updatedUser.profile.name).to.eql('Frodo');
});
});
});