Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-37801] Use the new Matcher in ViewCredentialsActionTest
  • Loading branch information
raul-arabaolaza committed Aug 30, 2016
1 parent b12bd48 commit 914b3a0
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -9,12 +9,12 @@
import java.util.Collections;
import java.util.List;
import java.util.Random;
import jenkins.model.Jenkins;

import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;

import static org.hamcrest.Matchers.is;
import static com.cloudbees.plugins.credentials.XmlMatchers.isSimilarToIgnoringPrivateAttrs;
import static org.junit.Assert.assertThat;

public class ViewCredentialsActionTest {
Expand All @@ -41,7 +41,7 @@ public void smokes() throws Exception {

JenkinsRule.WebClient wc = j.createWebClient();
WebResponse response = wc.goTo("credentials/api/xml?depth=5", "application/xml").getWebResponse();
assertThat(response.getContentAsString(), is("<rootActionImpl>"
assertThat(response.getContentAsString(), isSimilarToIgnoringPrivateAttrs("<rootActionImpl>"
+ "<stores>"
+ "<system>"
+ "<domains>"
Expand Down Expand Up @@ -71,7 +71,7 @@ public void smokes() throws Exception {
new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, credentialId,
credentialDescription, credentialUsername, "test-secret"));
response = wc.goTo("credentials/api/xml?depth=5", "application/xml").getWebResponse();
assertThat(response.getContentAsString(), is("<rootActionImpl>"
assertThat(response.getContentAsString(), isSimilarToIgnoringPrivateAttrs("<rootActionImpl>"
+ "<stores>"
+ "<system>"
+ "<domains>"
Expand Down

0 comments on commit 914b3a0

Please sign in to comment.