Router updates + unit tests + React

- added -f flag to run unit test command in order to fail fast
- pass only id to "$endpoint->get($id)" in React forms instead of array
- updated routers according to the ->get($id) change
- refactored a bit the way form creation works
- added unit tests for Segments router
This commit is contained in:
Jonathan Labreuille
2016-01-29 21:39:48 +01:00
parent d4623cf763
commit 4fd0c4b484
11 changed files with 161 additions and 66 deletions

View File

@ -48,7 +48,7 @@ define(
MailPoet.Ajax.post({
endpoint: this.props.endpoint,
action: 'get',
data: { id: id }
data: id
}).done(function(response) {
if(response === false) {
this.setState({

View File

@ -126,7 +126,7 @@ const FormList = React.createClass({
action: 'create'
}).done(function(response) {
if(response !== false) {
window.location = response;
window.location = mailpoet_form_edit_url + response;
}
});
},