Added test for the changes in DefaultArchivaConfiguration (escape character '\' showing up in repositories.jsp)

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@568382 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maria Odea B. Ching 2007-08-22 02:30:55 +00:00
parent 775cb8d1b6
commit e1a2228627
1 changed files with 12 additions and 2 deletions

View File

@ -532,16 +532,26 @@ public class ArchivaConfigurationTest
RepositoryConfiguration repository =
(RepositoryConfiguration) configuration.getRepositories().iterator().next();
assertEquals( "check cron expression", "0 0,30 * * ?", repository.getRefreshCronExpression().trim() );
assertEquals( "check cron expression", "0 0,30 * * ?", repository.getRefreshCronExpression() );
configuration.getDatabaseScanning().setCronExpression( "0 0,15 0 * * ?" );
archivaConfiguration.save( configuration );
configuration = archivaConfiguration.getConfiguration();
assertEquals( "check cron expression", "0 0,15 0 * * ?",
configuration.getDatabaseScanning().getCronExpression() );
// test for the escape character '\' showing up on repositories.jsp
repository.setRefreshCronExpression( "0 0,20 0 * * ?" );
archivaConfiguration.save( configuration );
repository = archivaConfiguration.getConfiguration().findRepositoryById( "snapshots" );
assertEquals( "check cron expression", "0 0,20 0 * * ?", repository.getRefreshCronExpression() );
}
}