Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added test for: #3711 #3762

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions spec/ParseQuery.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2532,6 +2532,33 @@ describe('Parse.Query testing', () => {
});
});

it("should return a dataset when matching a key in query (#3711)", function(done) {
var SeasonObject = new Parse.Object("Season");
SeasonObject.set("fullIdentifier", "CD117");

return SeasonObject.save().then(() => {
var FixtureObject = new Parse.Object("Fixture");
FixtureObject.set("season", SeasonObject);

return Parse.Promise.when(FixtureObject.save());
}).then((p) => {

var season = new Parse.Query("Season");
season.equalTo("fullIdentifier", "CD117");

return new Parse.Query("Fixture")
.matchesKeyInQuery("season", "objectId", season)
.find()
.then((r) => {
expect(r.length).toEqual(1);
if (r.length > 0) {
expect(r[0].id).toEqual(p.id);
}
done();
}, done.fail);
});
});

it('should find objects with array of pointers', (done) => {
var objects = [];
while(objects.length != 5) {
Expand Down