mirror of
https://github.com/outline/outline.git
synced 2025-04-11 15:59:08 +00:00
server test changes
This commit is contained in:
@ -1,2 +0,0 @@
|
||||
DATABASE_URL="postgresql://localhost:5432/atlas"
|
||||
SEQUELIZE_SECRET=7a947f4b6b5cd4c769029f7b5130c85fe2d3484758c0eeee351cd2e2d2c3bd59
|
13
package.json
13
package.json
@ -27,8 +27,15 @@
|
||||
"^.*[.](s?css|css)$": "<rootDir>/__mocks__/styleMock.js",
|
||||
"^.*[.](gif|ttf|eot|svg)$": "<rootDir>/__test__/fileMock.js"
|
||||
},
|
||||
"moduleFileExtensions": ["js", "jsx", "json"],
|
||||
"moduleDirectories": ["node_modules", "server"],
|
||||
"moduleFileExtensions": [
|
||||
"js",
|
||||
"jsx",
|
||||
"json"
|
||||
],
|
||||
"moduleDirectories": [
|
||||
"node_modules",
|
||||
"server"
|
||||
],
|
||||
"modulePaths": [
|
||||
"frontend"
|
||||
],
|
||||
@ -133,7 +140,7 @@
|
||||
"slug": "0.9.1",
|
||||
"string-hash": "^1.1.0",
|
||||
"style-loader": "0.13.0",
|
||||
"truncate-html": "0.0.6",
|
||||
"truncate-html": "https://github.com/jorilallo/truncate-html/tarball/master",
|
||||
"url-loader": "0.5.7",
|
||||
"uuid": "2.0.2",
|
||||
"validator": "5.2.0",
|
||||
|
@ -8,11 +8,11 @@ import { flushdb, seed, sequelize } from '../test/support';
|
||||
const server = new TestServer(app.callback());
|
||||
|
||||
beforeEach(flushdb);
|
||||
beforeEach(seed);
|
||||
afterAll(() => server.close());
|
||||
afterAll(() => sequelize.close());
|
||||
|
||||
it('should return known user', async () => {
|
||||
await seed();
|
||||
const user = await User.findOne({
|
||||
where: {
|
||||
email: 'user1@example.com',
|
||||
@ -29,6 +29,7 @@ it('should return known user', async () => {
|
||||
});
|
||||
|
||||
it('should require authentication', async () => {
|
||||
await seed();
|
||||
const res = await server.post('/api/user.info');
|
||||
const body = await res.json();
|
||||
|
||||
|
Reference in New Issue
Block a user