Commit 3e8bbdf7 authored by Dominique Merle's avatar Dominique Merle 💬
Browse files

Add the step definition for deleting polls.

We'll need another step def for deleting polls using a password.
parent 48f46896
......@@ -115,4 +115,19 @@ class ApiRestFeatureContext extends BaseFeatureContext
}
}
/**
* @When /^(?P<actor>.+?)(?P<try> (?:essa[iy]ez?|tente) de|) supprimer?(?: (?:de|à) nouveau)? le scrutin titré "(?P<title>.+)"$/ui
* @When /^(?P<actor>.+?)(?P<try> tr(?:y|ies) to|) deletes? the majority judgment poll titled "(?P<title>.+)"$/ui
*/
public function actorDeletesTheLimajuPollTitled($actor, $try, $title)
{
$poll = $this->findOneLimajuPollFromTitle($title);
$this->actor($actor)->api(
'DELETE',"/limaju_polls/".$poll->getId(),
[], [], !empty($try)
);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment