BVB Source Codes

parse-server Show PublicAPI.spec.js Source code

Return Download parse-server: download PublicAPI.spec.js Source code - Download parse-server Source code - Type:.js
  1.  
  2. var request = require('request');
  3.  
  4. describe("public API", () => {
  5.   it("should get invalid_link.html", (done) => {
  6.     request('http://localhost:8378/1/apps/invalid_link.html', (err, httpResponse) => {
  7.       expect(httpResponse.statusCode).toBe(200);
  8.       done();
  9.     });
  10.   });
  11.  
  12.   it("should get choose_password", (done) => {
  13.     reconfigureServer({
  14.       appName: 'unused',
  15.       publicServerURL: 'http://localhost:8378/1',
  16.     })
  17.     .then(() => {
  18.       request('http://localhost:8378/1/apps/choose_password?id=test', (err, httpResponse) => {
  19.         expect(httpResponse.statusCode).toBe(200);
  20.         done();
  21.       });
  22.     })
  23.   });
  24.  
  25.   it("should get verify_email_success.html", (done) => {
  26.     request('http://localhost:8378/1/apps/verify_email_success.html', (err, httpResponse) => {
  27.       expect(httpResponse.statusCode).toBe(200);
  28.       done();
  29.     });
  30.   });
  31.  
  32.   it("should get password_reset_success.html", (done) => {
  33.     request('http://localhost:8378/1/apps/password_reset_success.html', (err, httpResponse) => {
  34.       expect(httpResponse.statusCode).toBe(200);
  35.       done();
  36.     });
  37.   });
  38. });
  39.  
  40. describe("public API without publicServerURL", () => {
  41.   beforeEach(done => {
  42.     reconfigureServer({ appName: 'unused' })
  43.     .then(done, fail);
  44.   });
  45.   it("should get 404 on verify_email", (done) => {
  46.     request('http://localhost:8378/1/apps/test/verify_email', (err, httpResponse) => {
  47.       expect(httpResponse.statusCode).toBe(404);
  48.       done();
  49.     });
  50.   });
  51.  
  52.   it("should get 404 choose_password", (done) => {
  53.     request('http://localhost:8378/1/apps/choose_password?id=test', (err, httpResponse) => {
  54.       expect(httpResponse.statusCode).toBe(404);
  55.       done();
  56.     });
  57.   });
  58.  
  59.   it("should get 404 on request_password_reset", (done) => {
  60.     request('http://localhost:8378/1/apps/test/request_password_reset', (err, httpResponse) => {
  61.       expect(httpResponse.statusCode).toBe(404);
  62.       done();
  63.     });
  64.   });
  65. });
  66.  
downloadPublicAPI.spec.js Source code - Download parse-server Source code
Related Source Codes/Software:
react-boilerplate - 2017-06-07
webtorrent - Streaming torrent client for the web ... 2017-06-06
machine-learning-for-software-engineers - A complete daily plan for studying to become a mac... 2017-06-06
upterm - A terminal emulator for the 21st century. 2017-06-06
lottie-android - Render After Effects animations natively on Androi... 2017-06-07
AsyncDisplayKit - Smooth asynchronous user interfaces for iOS apps. ... 2017-06-07
ionicons - The premium icon font for Ionic ... 2017-06-07
storybook - 2017-06-07
prettier - Prettier is an opinionated JavaScript formatter. ... 2017-06-08
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top