💚
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
/* eslint-disable */
|
||||
import UiStore from './UiStore';
|
||||
import stores from '.';
|
||||
|
||||
// Actions
|
||||
describe('UiStore', () => {
|
||||
let store;
|
||||
|
||||
beforeEach(() => {
|
||||
store = new UiStore();
|
||||
store = new stores.UiStore();
|
||||
});
|
||||
|
||||
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 {
|
||||
"data": Object {
|
||||
"avatarUrl": "http://example.com/avatar.png",
|
||||
"email": "user1@example.com",
|
||||
"id": "46fde1d4-0050-428f-9f0b-0bf77f4bdf61",
|
||||
"isAdmin": false,
|
||||
"isSuspended": false,
|
||||
"name": "New name",
|
||||
"username": "user1",
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* eslint-disable flowtype/require-valid-file-annotation */
|
||||
import { flushdb, seed } from '../../test/support';
|
||||
import { buildUser } from '../../test/factories';
|
||||
import { ApiKey } from '../../models';
|
||||
import { flushdb, seed } from '../test/support';
|
||||
import { buildUser } from '../test/factories';
|
||||
import { ApiKey } from '../models';
|
||||
import randomstring from 'randomstring';
|
||||
import auth from './authentication';
|
||||
|
||||
|
Reference in New Issue
Block a user