Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-beck committed Aug 31, 2023
1 parent feedeb3 commit 67cabb6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/test/java/com/sonyericsson/rebuild/RebuildValidatorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
*/
package com.sonyericsson.rebuild;

import java.net.URL;
import org.htmlunit.HttpMethod;
import org.htmlunit.Page;
import org.htmlunit.WebAssert;
import org.htmlunit.WebRequest;
import org.htmlunit.html.HtmlAnchor;
Expand All @@ -51,7 +49,13 @@
import org.junit.Rule;
import org.junit.Test;

import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.endsWith;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.TestExtension;
Expand Down Expand Up @@ -279,9 +283,8 @@ public void testWhenProjectWithParamsThenRebuildProjectExecutesRebuildOfLastBuil
WebAssert.assertLinkPresentWithText(projectPage, "Rebuild Last");

HtmlAnchor rebuildHref = projectPage.getAnchorByText("Rebuild Last");
assertEquals("Rebuild Last should point to the second build",
"lastCompletedBuild/rebuild/parameterized",
rebuildHref.getHrefAttribute());
assertThat(rebuildHref.getHrefAttribute(),
endsWith("lastCompletedBuild/rebuild/parameterized"));
}

/**
Expand Down

0 comments on commit 67cabb6

Please sign in to comment.