💚
This commit is contained in:
@ -1,12 +1,12 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import UiStore from './UiStore';
|
import stores from '.';
|
||||||
|
|
||||||
// Actions
|
// Actions
|
||||||
describe('UiStore', () => {
|
describe('UiStore', () => {
|
||||||
let store;
|
let store;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
store = new UiStore();
|
store = new stores.UiStore();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('#add should add errors', () => {
|
test('#add should add errors', () => {
|
||||||
|
@ -1,82 +0,0 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
||||||
|
|
||||||
exports[`#auth.login should login with email 1`] = `
|
|
||||||
Object {
|
|
||||||
"avatarUrl": "http://example.com/avatar.png",
|
|
||||||
"id": "46fde1d4-0050-428f-9f0b-0bf77f4bdf61",
|
|
||||||
"name": "User 1",
|
|
||||||
"username": "user1",
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`#auth.login should login with username 1`] = `
|
|
||||||
Object {
|
|
||||||
"avatarUrl": "http://example.com/avatar.png",
|
|
||||||
"id": "46fde1d4-0050-428f-9f0b-0bf77f4bdf61",
|
|
||||||
"name": "User 1",
|
|
||||||
"username": "user1",
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`#auth.login should require either username or email 1`] = `
|
|
||||||
Object {
|
|
||||||
"error": "validation_error",
|
|
||||||
"message": "username/email is required",
|
|
||||||
"ok": false,
|
|
||||||
"status": 400,
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`#auth.login should require password 1`] = `
|
|
||||||
Object {
|
|
||||||
"error": "validation_error",
|
|
||||||
"message": "username/email is required",
|
|
||||||
"ok": false,
|
|
||||||
"status": 400,
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`#auth.login should validate password 1`] = `
|
|
||||||
Object {
|
|
||||||
"error": "validation_error",
|
|
||||||
"message": "username/email is required",
|
|
||||||
"ok": false,
|
|
||||||
"status": 400,
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`#auth.signup should require params 1`] = `
|
|
||||||
Object {
|
|
||||||
"error": "validation_error",
|
|
||||||
"message": "name is required",
|
|
||||||
"ok": false,
|
|
||||||
"status": 400,
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`#auth.signup should require unique email 1`] = `
|
|
||||||
Object {
|
|
||||||
"error": "user_exists_with_email",
|
|
||||||
"message": "User already exists with this email",
|
|
||||||
"ok": false,
|
|
||||||
"status": 400,
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`#auth.signup should require unique username 1`] = `
|
|
||||||
Object {
|
|
||||||
"error": "user_exists_with_username",
|
|
||||||
"message": "User already exists with this username",
|
|
||||||
"ok": false,
|
|
||||||
"status": 400,
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
exports[`#auth.signup should require valid email 1`] = `
|
|
||||||
Object {
|
|
||||||
"error": "validation_error",
|
|
||||||
"message": "email is invalid",
|
|
||||||
"ok": false,
|
|
||||||
"status": 400,
|
|
||||||
}
|
|
||||||
`;
|
|
@ -153,7 +153,10 @@ exports[`#user.update should update user profile information 1`] = `
|
|||||||
Object {
|
Object {
|
||||||
"data": Object {
|
"data": Object {
|
||||||
"avatarUrl": "http://example.com/avatar.png",
|
"avatarUrl": "http://example.com/avatar.png",
|
||||||
|
"email": "user1@example.com",
|
||||||
"id": "46fde1d4-0050-428f-9f0b-0bf77f4bdf61",
|
"id": "46fde1d4-0050-428f-9f0b-0bf77f4bdf61",
|
||||||
|
"isAdmin": false,
|
||||||
|
"isSuspended": false,
|
||||||
"name": "New name",
|
"name": "New name",
|
||||||
"username": "user1",
|
"username": "user1",
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* eslint-disable flowtype/require-valid-file-annotation */
|
/* eslint-disable flowtype/require-valid-file-annotation */
|
||||||
import { flushdb, seed } from '../../test/support';
|
import { flushdb, seed } from '../test/support';
|
||||||
import { buildUser } from '../../test/factories';
|
import { buildUser } from '../test/factories';
|
||||||
import { ApiKey } from '../../models';
|
import { ApiKey } from '../models';
|
||||||
import randomstring from 'randomstring';
|
import randomstring from 'randomstring';
|
||||||
import auth from './authentication';
|
import auth from './authentication';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user