From 2628be60d1c75fd2262abc85f5f0cf14bffe3915 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Fri, 14 Mar 2014 08:54:36 -0500 Subject: [PATCH] SEC-2173: Added SystemWideSaltSource.toString() test --- .../dao/salt/SystemWideSaltSourceTests.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/src/test/java/org/springframework/security/authentication/dao/salt/SystemWideSaltSourceTests.java b/core/src/test/java/org/springframework/security/authentication/dao/salt/SystemWideSaltSourceTests.java index 9e512b54a4..1570aed13a 100644 --- a/core/src/test/java/org/springframework/security/authentication/dao/salt/SystemWideSaltSourceTests.java +++ b/core/src/test/java/org/springframework/security/authentication/dao/salt/SystemWideSaltSourceTests.java @@ -15,6 +15,8 @@ package org.springframework.security.authentication.dao.salt; +import static org.fest.assertions.Assertions.assertThat; + import org.springframework.security.authentication.dao.SystemWideSaltSource; import junit.framework.TestCase; @@ -69,4 +71,12 @@ public class SystemWideSaltSourceTests extends TestCase { saltSource.afterPropertiesSet(); assertEquals("helloWorld", saltSource.getSalt(null)); } + + // SEC-2173 + public void testToString() { + String systemWideSalt = "helloWorld"; + SystemWideSaltSource saltSource = new SystemWideSaltSource(); + saltSource.setSystemWideSalt(systemWideSalt); + assertThat(saltSource.toString()).isEqualTo(systemWideSalt); + } }