<commit_before>const { expect } = require('chai');
const app = require('../../../../src/app');
const testObjects = require('../../helpers/testObjects')(app);

const userPermissions = app.service('/permissions/user');

describe('userPermissions', async () => {
	let server;
	const ROLES = {
		TEST: 'test',
		OTHER: 'other',
		NOTHING: 'nothing spezial',
	};
	const testPermissions = ['SINGING', 'DANCE_RAIN', 'WALK_LINES', 'RUN_FLOOR'];

	const otherPermissions = ['SITTING', 'SITTING_ON_CHAIR', 'SITTING_ON_DESK'];

	let testRole;
	let otherRole;
	let testSchool;
	let testSchool2;
	let testUser;
	let testUser2;
	let otherUser;
	let accountTestUser;
	let accountTestUser2;
	let accountTestUserOther;

	const commonAccountData = {
		password: <PASSWORD>',
		activated: true,
		createdAt: '2017-09-04T12:51:58.49Z',
	};

	const dataTestUser1 = {
		username: 'testuser1',
		...commonAccountData,
	};

	const dataTestUser2 = {
		username: 'testuser2',
		...commonAccountData,
	};

	const dataTestUserOther = {
		username: 'testuserother',
		...commonAccountData,
	};

	before((done) => {
		server = app.listen(0, async () => {
			testRole = await testObjects.createTestRole({
				name: ROLES.TEST,
				permissions: testPermissions,
			});

			otherRole = await testObjects.createTestRole({
				name: ROLES.OTHER,
				permissions: otherPermissions,
			});

			testSchool = await testObjects.createTestSchool({<commit_msg>Set proper user names in userPermissions tests<commit_after>const { expect } = require('chai');
const app = require('../../../../src/app');
const testObjects = require('../../helpers/testObjects')(app);

const userPermissions = app.service('/permissions/user');

describe('userPermissions', async () => {
	let server;
	const ROLES = {
		TEST: 'test',
		OTHER: 'other',
		NOTHING: 'nothing spezial',
	};
	const testPermissions = ['SINGING', 'DANCE_RAIN', 'WALK_LINES', 'RUN_FLOOR'];

	const otherPermissions = ['SITTING', 'SITTING_ON_CHAIR', 'SITTING_ON_DESK'];

	let testRole;
	let otherRole;
	let testSchool;
	let testSchool2;
	let testUser;
	let testUser2;
	let otherUser;
	let accountTestUser;
	let accountTestUser2;
	let accountTestUserOther;

	const commonAccountData = {
		password: <PASSWORD>',
		activated: true,
		createdAt: '2017-09-04T12:51:58.49Z',
	};

	const dataTestUser1 = {
		username: '<EMAIL>',
		...commonAccountData,
	};

	const dataTestUser2 = {
		username: '<EMAIL>',
		...commonAccountData,
	};

	const dataTestUserOther = {
		username: '<EMAIL>',
		...commonAccountData,
	};

	before((done) => {
		server = app.listen(0, async () => {
			testRole = await testObjects.createTestRole({
				name: ROLES.TEST,
				permissions: testPermissions,
			});

			otherRole = await testObjects.createTestRole({
				name: ROLES.OTHER,
				permissions: otherPermissions,
			});

			testSchool = await testObjects.createTestSchool({
{'fraction_non_alphanumeric': 0.15320041972717732, 'fraction_numerical': 0.01608954179783141, 'mean_word_length': 4.247706422018348, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5758718', 'n_tokens_mistral': 1075, 'n_tokens_neox': 974, 'n_words': 205}