You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2014/03/27 08:37:58 UTC

svn commit: r1582208 - in /syncope/trunk/core/src: main/resources/mailTemplates/optin.html.vm main/resources/mailTemplates/optin.txt.vm test/java/org/apache/syncope/core/notification/NotificationTest.java

Author: ilgrosso
Date: Thu Mar 27 07:37:57 2014
New Revision: 1582208

URL: http://svn.apache.org/r1582208
Log:
[SYNCOPE-487] optin mail templates updated to 1.2.X TOs

Modified:
    syncope/trunk/core/src/main/resources/mailTemplates/optin.html.vm
    syncope/trunk/core/src/main/resources/mailTemplates/optin.txt.vm
    syncope/trunk/core/src/test/java/org/apache/syncope/core/notification/NotificationTest.java

Modified: syncope/trunk/core/src/main/resources/mailTemplates/optin.html.vm
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/resources/mailTemplates/optin.html.vm?rev=1582208&r1=1582207&r2=1582208&view=diff
==============================================================================
--- syncope/trunk/core/src/main/resources/mailTemplates/optin.html.vm (original)
+++ syncope/trunk/core/src/main/resources/mailTemplates/optin.html.vm Thu Mar 27 07:37:57 2014
@@ -19,11 +19,11 @@ under the License.
 -->
 <html>
 <body>
-<h3>Hi $user.getAttributeMap().get("firstname").getValues().get(0) $user.getAttributeMap().get("surname").getValues().get(0), welcome to Syncope!</h3>
+<h3>Hi $user.getAttrMap().get("firstname").getValues().get(0) $user.getAttrMap().get("surname").getValues().get(0), welcome to Syncope!</h3>
 
 <p>
    Your username is $user.getUsername().<br/>
-   Your email address is $user.getAttributeMap().get("email").getValues().get(0).
+   Your email address is $user.getAttrMap().get("email").getValues().get(0).
    Your email address inside a <a href="http://localhost/?email=$esc.url($user.getUsername())">link</a>.
 </p>
 
@@ -31,7 +31,7 @@ under the License.
     This message was sent to the following recipients:
 <ul>
 #foreach($recipient in $recipients)
-  <li>$recipient.getAttributeMap().get("email").getValues().get(0)</li>
+  <li>$recipient.getAttrMap().get("email").getValues().get(0)</li>
 #end
 </ul>
 

Modified: syncope/trunk/core/src/main/resources/mailTemplates/optin.txt.vm
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/resources/mailTemplates/optin.txt.vm?rev=1582208&r1=1582207&r2=1582208&view=diff
==============================================================================
--- syncope/trunk/core/src/main/resources/mailTemplates/optin.txt.vm (original)
+++ syncope/trunk/core/src/main/resources/mailTemplates/optin.txt.vm Thu Mar 27 07:37:57 2014
@@ -9,15 +9,15 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-Hi $user.getAttributeMap().get("firstname").getValues().get(0) $user.getAttributeMap().get("surname").getValues().get(0), welcome to Syncope!
+Hi $user.getAttrMap().get("firstname").getValues().get(0) $user.getAttrMap().get("surname").getValues().get(0), welcome to Syncope!
 
 Your username is $user.getUsername().
-Your email address is $user.getAttributeMap().get("email").getValues().get(0).
+Your email address is $user.getAttrMap().get("email").getValues().get(0).
 Your email address inside a link: http://localhost/?email=$esc.url($user.getUsername()) .
 
 This message was sent to the following recipients:
 #foreach($recipient in $recipients)
-   * $recipient.getAttributeMap().get("surname").getValues().get(0)
+   * $recipient.getAttrMap().get("surname").getValues().get(0)
 #end
 
 becase one of the following events occurred:

Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/notification/NotificationTest.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/notification/NotificationTest.java?rev=1582208&r1=1582207&r2=1582208&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/notification/NotificationTest.java (original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/notification/NotificationTest.java Thu Mar 27 07:37:57 2014
@@ -251,12 +251,11 @@ public class NotificationTest {
         }
         assertNotNull(taskId);
         assertNotNull(textBody);
-        // FIXME: this fails - optin.txt.vm not correct?
-//        assertTrue("Notification mail text doesn't contain expected content.",
-//                textBody.contains("Your email address is notificationtest@syncope.apache.org."));
         assertTrue("Notification mail text doesn't contain expected content.",
-                textBody.contains(
-                        "Your email address inside a link: http://localhost/?email=notificationtest%40syncope.apache.org ."));
+		   textBody.contains("Your email address is notificationtest@syncope.apache.org."));
+        assertTrue("Notification mail text doesn't contain expected content.",
+		   textBody.contains("Your email address inside a link: " 
+				     + "http://localhost/?email=notificationtest%40syncope.apache.org ."));
 
         // 5. execute Notification task and verify e-mail
         taskController.execute(taskId, false);