* reload the right data More passing postgres tests Handle schema updates, and $in for non array columns remove authdata from user and implement ensureUniqueness Make some tests work, detect existing classes Throw proper error for unique index violation fix findOneAndUpdate Support more types support more type Support boolean, fix _rperm/_wperm, add TODO Support string types and also simplify tests Move operator flattening into Parse Server and out of mongo adapters Move authdata transform for create into Parse Server Move authdata transforms completely in to Parse Server Fix test setup inline addSchema Inject default schema to response from DB adapter * Mark tests that don't work in Postgres * Exclude one more test * Exclude some more failing tests * Exclude more tests
66 lines
1.9 KiB
JavaScript
66 lines
1.9 KiB
JavaScript
|
||
var request = require('request');
|
||
|
||
describe("public API", () => {
|
||
it("should get invalid_link.html", (done) => {
|
||
request('http://localhost:8378/1/apps/invalid_link.html', (err, httpResponse, body) => {
|
||
expect(httpResponse.statusCode).toBe(200);
|
||
done();
|
||
});
|
||
});
|
||
|
||
it("should get choose_password", (done) => {
|
||
reconfigureServer({
|
||
appName: 'unused',
|
||
publicServerURL: 'http://localhost:8378/1',
|
||
})
|
||
.then(() => {
|
||
request('http://localhost:8378/1/apps/choose_password?id=test', (err, httpResponse, body) => {
|
||
expect(httpResponse.statusCode).toBe(200);
|
||
done();
|
||
});
|
||
})
|
||
});
|
||
|
||
it("should get verify_email_success.html", (done) => {
|
||
request('http://localhost:8378/1/apps/verify_email_success.html', (err, httpResponse, body) => {
|
||
expect(httpResponse.statusCode).toBe(200);
|
||
done();
|
||
});
|
||
});
|
||
|
||
it("should get password_reset_success.html", (done) => {
|
||
request('http://localhost:8378/1/apps/password_reset_success.html', (err, httpResponse, body) => {
|
||
expect(httpResponse.statusCode).toBe(200);
|
||
done();
|
||
});
|
||
});
|
||
});
|
||
|
||
describe("public API without publicServerURL", () => {
|
||
beforeEach(done => {
|
||
reconfigureServer({ appName: 'unused' })
|
||
.then(done, fail);
|
||
})
|
||
it("should get 404 on verify_email", (done) => {
|
||
request('http://localhost:8378/1/apps/test/verify_email', (err, httpResponse, body) => {
|
||
expect(httpResponse.statusCode).toBe(404);
|
||
done();
|
||
});
|
||
});
|
||
|
||
it("should get 404 choose_password", (done) => {
|
||
request('http://localhost:8378/1/apps/choose_password?id=test', (err, httpResponse, body) => {
|
||
expect(httpResponse.statusCode).toBe(404);
|
||
done();
|
||
});
|
||
});
|
||
|
||
it("should get 404 on request_password_reset", (done) => {
|
||
request('http://localhost:8378/1/apps/test/request_password_reset', (err, httpResponse, body) => {
|
||
expect(httpResponse.statusCode).toBe(404);
|
||
done();
|
||
});
|
||
});
|
||
});
|