Skip to content

Commit

Permalink
Тест добавления и удаления репозиториев
Browse files Browse the repository at this point in the history
  • Loading branch information
Enfaseel committed May 22, 2019
1 parent 1af989c commit dc260b8
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/repositories.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
test('add repository mem', async () => {
const url = 'https://agentlab.ru/rdf4j-workbench/repositories/NONE/create';
const data = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body:
'type=memory&Repository+ID=mem&Repository+title=memmem&Persist=true&Sync+delay=0&EvaluationStrategyFactory=org.eclipse.rdf4j.query.algebra.evaluation.impl.StrictEvaluationStrategyFactory',
}).then((r) => {
//console.log(r);
return r;
});
expect(data.status).toBe(200);
});

test('remove repository mem', async () => {
const url = 'https://agentlab.ru/rdf4j-workbench/repositories/NONE/delete';
const data = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: 'id=mem',
}).then((r) => {
//console.log(r);
return r;
});
//.catch(e => console.log(e));
expect(data.status).toBe(200);
});

0 comments on commit dc260b8

Please sign in to comment.