Преглед на файлове

Logging adjustments for gae sample.

Luke Taylor преди 15 години
родител
ревизия
d1279aeda2
променени са 2 файла, в които са добавени 10 реда и са изтрити 4 реда
  1. 3 2
      samples/gae/src/main/webapp/WEB-INF/logging.properties
  2. 7 2
      samples/gae/src/test/java/samples/gae/security/AppRoleTests.java

+ 3 - 2
samples/gae/src/main/webapp/WEB-INF/logging.properties

@@ -1,4 +1,5 @@
 .level = INFO
 
-org.springframework.level = FINE
-org.springframework.security.level = FINER
+samples.gae.level = FINER
+org.springframework.level = INFO
+org.springframework.security.level = FINER

+ 7 - 2
samples/gae/src/test/java/samples/gae/security/AppRoleTests.java

@@ -18,6 +18,11 @@ public class AppRoleTests {
         assertEquals("ADMIN", admin.getAuthority());
     }
 
-
-
+    @Test
+    public void bitsAreCorrect() throws Exception {
+        // If this fails, someone has modified the Enum and the Datastore is probably corrupt!
+        assertEquals(0, ADMIN.getBit());
+        assertEquals(1, NEW_USER.getBit());
+        assertEquals(2, USER.getBit());
+    }
 }