You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2018/11/02 12:20:23 UTC

[openmeetings] branch master updated: [OPENMEETINGS-1856] tests should be fixed

This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git


The following commit(s) were added to refs/heads/master by this push:
     new cf2be58  [OPENMEETINGS-1856] tests should be fixed
cf2be58 is described below

commit cf2be58e2d812b42b9eb39e546431d570ba48b87
Author: Maxim Solodovnik <so...@gmail.com>
AuthorDate: Fri Nov 2 19:20:07 2018 +0700

    [OPENMEETINGS-1856] tests should be fixed
---
 .../src/main/java/org/apache/openmeetings/db/util/LocaleHelper.java    | 3 ++-
 .../src/test/java/org/apache/openmeetings/web/pages/TestHashPage.java  | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/openmeetings-db/src/main/java/org/apache/openmeetings/db/util/LocaleHelper.java b/openmeetings-db/src/main/java/org/apache/openmeetings/db/util/LocaleHelper.java
index b4eaef8..9998cd5 100644
--- a/openmeetings-db/src/main/java/org/apache/openmeetings/db/util/LocaleHelper.java
+++ b/openmeetings-db/src/main/java/org/apache/openmeetings/db/util/LocaleHelper.java
@@ -59,7 +59,8 @@ public class LocaleHelper {
 	}
 
 	public static Locale getLocale(Long langId) {
-		return langId == 3 ? Locale.GERMANY : LabelDao.getLocale(langId);
+		Locale l = langId == 3 ? Locale.GERMANY : LabelDao.getLocale(langId);
+		return l == null ? Locale.ENGLISH : l;
 	}
 
 	public static Locale getLocale(User u) {
diff --git a/openmeetings-web/src/test/java/org/apache/openmeetings/web/pages/TestHashPage.java b/openmeetings-web/src/test/java/org/apache/openmeetings/web/pages/TestHashPage.java
index 051c9c2..ea648b4 100644
--- a/openmeetings-web/src/test/java/org/apache/openmeetings/web/pages/TestHashPage.java
+++ b/openmeetings-web/src/test/java/org/apache/openmeetings/web/pages/TestHashPage.java
@@ -140,7 +140,7 @@ public class TestHashPage extends AbstractWicketTester {
 	@Test
 	public void testBadSecure() {
 		log.debug("bad secure");
-		checkAccessDenied(new PageParameters().add(HASH, "bbb").add(HashPage.LANG, 7));
+		checkAccessDenied(new PageParameters().add(HASH, "bbb").add(HashPage.LANG, 3));
 	}
 
 	@Test