Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-12875] Fix test
  • Loading branch information
daniel-beck committed Mar 31, 2016
1 parent ed0ea63 commit 5b16422
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/src/test/java/lib/form/RowSetTest.java
Expand Up @@ -2,6 +2,7 @@

import com.gargoylesoftware.htmlunit.html.HtmlPage;
import hudson.model.RootAction;
import hudson.security.csrf.CrumbIssuer;
import junit.framework.Assert;
import net.sf.json.JSONObject;
import org.junit.Rule;
Expand All @@ -27,12 +28,12 @@ public void json() throws Exception {
public static class Subject implements RootAction {
public void doSubmitTest1(StaplerRequest req) throws Exception {
JSONObject json = req.getSubmittedForm();
json.remove("crumb");
json.remove(CrumbIssuer.DEFAULT_CRUMB_NAME);
System.out.println(json);

JSONObject expected = JSONObject.fromObject(
"{'a':'aaa','b':'bbb','c':{'c1':'ccc1','c2':'ccc2'},'d':{'d1':'d1','d2':'d2'}}");
Assert.assertEquals(json,expected);
Assert.assertEquals(expected, json);
}

@Override
Expand Down

0 comments on commit 5b16422

Please sign in to comment.