chore: Move to prettier standard double quotes (#1309)
This commit is contained in:
@ -1,24 +1,24 @@
|
||||
/* eslint-disable flowtype/require-valid-file-annotation */
|
||||
import TestServer from 'fetch-test-server';
|
||||
import app from '../app';
|
||||
import { flushdb, seed } from '../test/support';
|
||||
import { buildDocument, buildUser } from '../test/factories';
|
||||
import Revision from '../models/Revision';
|
||||
import TestServer from "fetch-test-server";
|
||||
import app from "../app";
|
||||
import { flushdb, seed } from "../test/support";
|
||||
import { buildDocument, buildUser } from "../test/factories";
|
||||
import Revision from "../models/Revision";
|
||||
|
||||
const server = new TestServer(app.callback());
|
||||
|
||||
beforeEach(flushdb);
|
||||
afterAll(server.close);
|
||||
|
||||
describe('#revisions.info', async () => {
|
||||
it('should return a document revision', async () => {
|
||||
describe("#revisions.info", async () => {
|
||||
it("should return a document revision", async () => {
|
||||
const { user, document } = await seed();
|
||||
const revision = await Revision.findOne({
|
||||
where: {
|
||||
documentId: document.id,
|
||||
},
|
||||
});
|
||||
const res = await server.post('/api/revisions.info', {
|
||||
const res = await server.post("/api/revisions.info", {
|
||||
body: {
|
||||
token: user.getJwtToken(),
|
||||
id: revision.id,
|
||||
@ -31,7 +31,7 @@ describe('#revisions.info', async () => {
|
||||
expect(body.data.title).toEqual(document.title);
|
||||
});
|
||||
|
||||
it('should require authorization', async () => {
|
||||
it("should require authorization", async () => {
|
||||
const document = await buildDocument();
|
||||
const revision = await Revision.findOne({
|
||||
where: {
|
||||
@ -39,7 +39,7 @@ describe('#revisions.info', async () => {
|
||||
},
|
||||
});
|
||||
const user = await buildUser();
|
||||
const res = await server.post('/api/revisions.info', {
|
||||
const res = await server.post("/api/revisions.info", {
|
||||
body: {
|
||||
token: user.getJwtToken(),
|
||||
id: revision.id,
|
||||
@ -49,10 +49,10 @@ describe('#revisions.info', async () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('#revisions.list', async () => {
|
||||
describe("#revisions.list", async () => {
|
||||
it("should return a document's revisions", async () => {
|
||||
const { user, document } = await seed();
|
||||
const res = await server.post('/api/revisions.list', {
|
||||
const res = await server.post("/api/revisions.list", {
|
||||
body: {
|
||||
token: user.getJwtToken(),
|
||||
documentId: document.id,
|
||||
@ -66,22 +66,22 @@ describe('#revisions.list', async () => {
|
||||
expect(body.data[0].title).toEqual(document.title);
|
||||
});
|
||||
|
||||
it('should not return revisions for document in collection not a member of', async () => {
|
||||
it("should not return revisions for document in collection not a member of", async () => {
|
||||
const { user, document, collection } = await seed();
|
||||
collection.private = true;
|
||||
await collection.save();
|
||||
|
||||
const res = await server.post('/api/revisions.list', {
|
||||
const res = await server.post("/api/revisions.list", {
|
||||
body: { token: user.getJwtToken(), documentId: document.id },
|
||||
});
|
||||
|
||||
expect(res.status).toEqual(403);
|
||||
});
|
||||
|
||||
it('should require authorization', async () => {
|
||||
it("should require authorization", async () => {
|
||||
const document = await buildDocument();
|
||||
const user = await buildUser();
|
||||
const res = await server.post('/api/revisions.list', {
|
||||
const res = await server.post("/api/revisions.list", {
|
||||
body: {
|
||||
token: user.getJwtToken(),
|
||||
documentId: document.id,
|
||||
|
Reference in New Issue
Block a user