make_request now automatically launches a process

This commit is contained in:
Luke Miller
2021-05-08 12:18:13 -04:00
parent 797d0bebb8
commit 3b35817d5b
3 changed files with 17 additions and 9 deletions

View File

@ -6,7 +6,7 @@ test_org = modpol.instance:add_org('test_org')
test_org:add_member('luke')
test_org:add_member('nathan')
test_org:set_policy("add_member", nil, false);
test_org:set_policy("add_member", "consent", false);
new_request = {
user = "josh",
@ -16,7 +16,11 @@ new_request = {
request_id = test_org:make_request(new_request)
process_id = test_org:create_process("consent", request_id)
process = test_org.processes[process_id]
process:approve("luke", true)
process:approve("nathan", true)
-- process_id = test_org:create_process("consent", request_id)
for id, process in ipairs(test_org.processes) do
process:approve('luke', true)
process:approve('nathan', true)
end
-- process = test_org.processes[process_id]
-- process:approve("luke", true)
-- process:approve("nathan", true)