Skip to content
Permalink
Browse files

Merge pull request #22 from lvotypko/master

Test for JENKINS-25276.
  • Loading branch information...
olivergondza committed Oct 2, 2017
2 parents 55ef1b4 + b8bd73b commit 8a1ae9d6dd4385c11177bff6211fd841c9a38dda
Showing with 19 additions and 0 deletions.
  1. +19 −0 src/test/java/hudson/plugins/nested_view/NestedViewTest.java
@@ -30,6 +30,7 @@
import com.gargoylesoftware.htmlunit.html.HtmlOption;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import com.gargoylesoftware.htmlunit.xml.XmlPage;
import hudson.model.AbstractProject;
import hudson.model.AllView;
import hudson.model.Cause.UserCause;
import hudson.model.FreeStyleProject;
@@ -192,4 +193,22 @@ public void testDotConfigXmlOwnerSettings() throws Exception{
assertEquals("Nested subview of subview should have correct woner.",subview, subview.getView("nestedViewlvl2").getOwner());
assertEquals("Listview subview of subview should have correct woner.",subview, subview.getView("nestedViewlvl2").getOwner());
}


/**
* JENKINS-25276
*/
@Test
public void testRenameJob() throws IOException{
FreeStyleProject project = rule.createFreeStyleProject("project");
NestedView view = new NestedView("nested");
view.setOwner(rule.jenkins);
rule.jenkins.addView(view);
ListView subview = new ListView("listView", view);
view.addView(subview);
subview.add(project);
assertTrue("Subview 'listView' should contains item 'project'", subview.contains(project));
project.renameTo("project-renamed");
assertTrue("Subview contains renamed item.", subview.contains(project));
}
}

0 comments on commit 8a1ae9d

Please sign in to comment.
You can’t perform that action at this time.