On Fri, 2011-05-20 at 09:29 -0400, Dave Newton wrote: > On May 20, 2011 9:26 AM, "Ilya Kazakevich" wrote: > > There should not be logic in view. If there is no logic -- there is > nothing > > to test:) > > Sure there is, and I'm not even including JavaScript-based functionality. > Are the right things displayed? Does the UI reflect proper state? Is the > flow correct? Etc. >
I'm with Dave on this one. It's curious, because as we speak I am thinking how to test authorisation. My authorisation is based on 2 things: 1 - @Roles("role1,role2") annotation on the method/class This is easily tested with, eg, java reflection that compares the roles with an expected list of roles (you can ever automate it so that you fetch the list of all authorisations from a file and test all mehtods in the same test class 2 - <customtag:roles allowed="somerole"> content </customtag:roles>, which gets displayed or not depending on what roles the user has. Like Dave points out, this falls into the category of "Are the right things displayed".