Skip to content
Permalink
Browse files

Test for JENKINS-25276.

  • Loading branch information
lvotypko committed Sep 14, 2015
1 parent 55ef1b4 commit b8bd73baf8182d4744bb69704282f7addc20b56c
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 b8bd73b

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