summaryrefslogtreecommitdiffstats
path: root/src/test/java/com/gitblit/tests/GitServletTest.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-11-25 00:00:41 -0500
committerJames Moger <james.moger@gitblit.com>2013-11-29 11:05:51 -0500
commitf19b78e12517db6c4dcbb1981423830ea39916b3 (patch)
tree018f2389bf235c25bb3a2eda73ae9ecd71d7f3a1 /src/test/java/com/gitblit/tests/GitServletTest.java
parent04a98505a4ab8f48aee22800fcac193d9367d0ae (diff)
downloadgitblit-f19b78e12517db6c4dcbb1981423830ea39916b3.tar.gz
gitblit-f19b78e12517db6c4dcbb1981423830ea39916b3.zip
Revised committer verification to require email address
Change-Id: I5298c93e03099813f5713a4effd87913429aa3dc
Diffstat (limited to 'src/test/java/com/gitblit/tests/GitServletTest.java')
-rw-r--r--src/test/java/com/gitblit/tests/GitServletTest.java20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/test/java/com/gitblit/tests/GitServletTest.java b/src/test/java/com/gitblit/tests/GitServletTest.java
index bc392885..ad61a676 100644
--- a/src/test/java/com/gitblit/tests/GitServletTest.java
+++ b/src/test/java/com/gitblit/tests/GitServletTest.java
@@ -380,27 +380,15 @@ public class GitServletTest extends GitblitUnitTest {
public void testCommitterVerification() throws Exception {
UserModel user = getUser();
- // account only uses account name to verify
- testCommitterVerification(user, user.username, null, true);
- // committer email address is ignored because account does not specify email
- testCommitterVerification(user, user.username, "something", true);
- // completely different committer
testCommitterVerification(user, "joe", null, false);
+ testCommitterVerification(user, "joe", user.emailAddress, false);
+ testCommitterVerification(user, user.username, null, false);
+ testCommitterVerification(user, user.username, user.emailAddress, true);
- // test display name verification
user.displayName = "James Moger";
- testCommitterVerification(user, user.displayName, null, true);
- testCommitterVerification(user, user.displayName, "something", true);
- testCommitterVerification(user, "joe", null, false);
-
- // test email address verification
- user.emailAddress = "something";
testCommitterVerification(user, user.displayName, null, false);
- testCommitterVerification(user, user.displayName, "somethingelse", false);
+ testCommitterVerification(user, user.displayName, "something", false);
testCommitterVerification(user, user.displayName, user.emailAddress, true);
-
- // use same email address but with different committer
- testCommitterVerification(user, "joe", "somethingelse", false);
}
private void testCommitterVerification(UserModel user, String displayName, String emailAddress, boolean expectedSuccess) throws Exception {