Changed organisation* to organization* in descriptions, comments and endoints ✏

ref #117
This commit is contained in:
2021-01-24 18:34:15 +01:00
parent 5660aecb50
commit ef15d0d576
46 changed files with 145 additions and 145 deletions

View File

@@ -14,24 +14,24 @@ beforeAll(async () => {
};
});
describe('GET /api/organisations', () => {
describe('GET /api/organizations', () => {
it('basic get should return 200', async () => {
const res = await axios.get(base + '/api/organisations', axios_config);
const res = await axios.get(base + '/api/organizations', axios_config);
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json")
});
});
// ---------------
describe('POST /api/organisations', () => {
describe('POST /api/organizations', () => {
it('creating a new org with just a name should return 200', async () => {
const res = await axios.post(base + '/api/organisations', {
const res = await axios.post(base + '/api/organizations', {
"name": "test123"
}, axios_config);
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json")
});
it('creating a new org with without a name should return 400', async () => {
const res = await axios.post(base + '/api/organisations', {
const res = await axios.post(base + '/api/organizations', {
"name": null
}, axios_config);
expect(res.status).toEqual(400);
@@ -41,14 +41,14 @@ describe('POST /api/organisations', () => {
// ---------------
describe('adding + getting from all orgs', () => {
it('creating a new org with just a name should return 200', async () => {
const res = await axios.post(base + '/api/organisations', {
const res = await axios.post(base + '/api/organizations', {
"name": "test123"
}, axios_config);
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json")
});
it('check if org was added', async () => {
const res = await axios.get(base + '/api/organisations', axios_config);
const res = await axios.get(base + '/api/organizations', axios_config);
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json")
let added_org = res.data[res.data.length - 1]
@@ -72,7 +72,7 @@ describe('adding + getting from all orgs', () => {
describe('adding + getting explicitly', () => {
let added_org_id
it('creating a new org with just a name should return 200', async () => {
const res1 = await axios.post(base + '/api/organisations', {
const res1 = await axios.post(base + '/api/organizations', {
"name": "test123"
}, axios_config);
let added_org = res1.data
@@ -81,7 +81,7 @@ describe('adding + getting explicitly', () => {
expect(res1.headers['content-type']).toContain("application/json")
});
it('check if org was added', async () => {
const res2 = await axios.get(base + '/api/organisations/' + added_org_id, axios_config);
const res2 = await axios.get(base + '/api/organizations/' + added_org_id, axios_config);
expect(res2.status).toEqual(200);
expect(res2.headers['content-type']).toContain("application/json")
let added_org2 = res2.data