Skip to content

Commit

Permalink
Forward compatibility with jenkinsci/jenkins#7268 (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Sep 5, 2024
1 parent 994d3f2 commit 6fdfc07
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/test/java/org/jenkinsci/plugins/oic/PluginTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import edu.umd.cs.findbugs.annotations.Nullable;
import hudson.model.User;
import hudson.tasks.Mailer;
import hudson.util.VersionNumber;
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
Expand All @@ -39,6 +40,7 @@
import jenkins.model.Jenkins;
import jenkins.security.LastGrantedAuthoritiesProperty;
import org.hamcrest.MatcherAssert;
import org.htmlunit.html.HtmlPage;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
Expand Down Expand Up @@ -776,7 +778,10 @@ public void testLastGrantedAuthoritiesProperty() throws Exception {
3,
userProperty.getAuthorities2().size());

jenkinsRule.submit(webClient.goTo("me/configure").getFormByName("config"));
HtmlPage configure = Jenkins.getVersion().isNewerThan(new VersionNumber("2.467"))
? webClient.goTo("me/account/")
: webClient.goTo("me/configure");
jenkinsRule.submit(configure.getFormByName("config"));
user = User.getById(TEST_USER_USERNAME, false);
assertEquals(
"User should still be in 2 groups", 2, user.getAuthorities().size());
Expand Down

0 comments on commit 6fdfc07

Please sign in to comment.