On 9/21/07, Shing Wai Chan <[EMAIL PROTECTED]> wrote: > Hi, > > While looking at > org.apache.roller.weblogger.business.PermissionTest.testPermissionsLookups(), > I have a question. > The scenario is as follows: > mgr.grantWeblogPermission(testWeblog, user, actions); > .... > perms = mgr.getWeblogPermissionsPending(TestUtils.getManagedUser(user)); > assertEquals(1, perms.size()); > > Does the above test fail? > It is because grantWeblogPermission should create a permission with > pending = false > according to current implementation. > > There are many ways to fix it. The following are some alternatives: > 1. change to grantWeblogPermissionPending > 2. or change to getWeblogPermissions > 3. or change to assertEquals(0, perms.size())
I just committed a fix for this: http://svn.apache.org/viewvc?rev=579655&view=rev In the original tests before the latest changes to permissions method signature, we were granting a pending permission. I fixed the test to behave as they did before. - Dave
