Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Test for JENKINS-25276.
  • Loading branch information
lvotypko committed Sep 14, 2015
1 parent 55ef1b4 commit b8bd73b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/test/java/hudson/plugins/nested_view/NestedViewTest.java
Expand Up @@ -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;
Expand Down Expand Up @@ -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.