Skip to content

Commit

Permalink
Adds repro to issue #3289
Browse files Browse the repository at this point in the history
  • Loading branch information
flovilmart committed May 16, 2017
1 parent ab04641 commit 10ab95b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions spec/ParseUser.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2935,4 +2935,21 @@ describe('Parse.User testing', () => {
done();
});
});

it('should revoke sessions when setting paswword with masterKey (#3289)', (done) => {
let user;
Parse.User.signUp('username', 'password')
.then((newUser) => {
user = newUser;
user.set('password', 'newPassword');
return user.save(null, {useMasterKey: true});
}).then(() => {
const query = new Parse.Query('_Session');
query.equalTo('user', user);
return query.find({useMasterKey: true});
}).then((results) => {
expect(results.length).toBe(0);
done();
}, done.fail);
});
});

0 comments on commit 10ab95b

Please sign in to comment.