/** * https://jira.spring.io/browse/SPR-2866 */ @Test public void passwordValueIsNotRenderedIfShowPasswordAttributeIsSetToFalse() throws Exception { this.getTag().setPath("name"); this.getPasswordTag().setShowPassword(false); assertEquals(Tag.SKIP_BODY, this.getTag().doStartTag()); String output = getOutput(); assertTagOpened(output); assertTagClosed(output); assertContainsAttribute(output, "type", getType()); assertValueAttribute(output, ""); }
/** * https://jira.spring.io/browse/SPR-2866 */ @Test public void passwordValueIsRenderedIfShowPasswordAttributeIsSetToTrue() throws Exception { this.getTag().setPath("name"); this.getPasswordTag().setShowPassword(true); assertEquals(Tag.SKIP_BODY, this.getTag().doStartTag()); String output = getOutput(); assertTagOpened(output); assertTagClosed(output); assertContainsAttribute(output, "type", getType()); assertValueAttribute(output, "Rob"); }