org_req_test.lua 413 B

12345678910111213141516171819
  1. dofile('../modpol.lua');
  2. modpol.orgs.reset()
  3. test_org = modpol.instance:add_org('test_org')
  4. test_org:set_policy("add_member", nil, false);
  5. new_request = {
  6. user = "lukvmil",
  7. type = "add_member",
  8. params = {"lukvmil"}
  9. }
  10. request_id = test_org:make_request(new_request)
  11. process_id = test_org:create_process("consent", request_id)
  12. process = test_org.processes[process_id]
  13. process:approve("luke", true)