Skip to content

Commit fd8a557

Browse files
committed
URL Utils test fix
1 parent 0531009 commit fd8a557

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

WordPressUtils/src/androidTest/java/org/wordpress/android/util/UrlUtilsTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,18 @@ public void testAppendUrlParameters1() {
6161
params.put("w", "200");
6262
params.put("h", "300");
6363
String url = UrlUtils.appendUrlParameters("http://wp.com/test", params);
64-
assertEquals("http://wp.com/test?h=300&w=200", url);
64+
if (!url.equals("http://wp.com/test?h=300&w=200") && !url.equals("http://wp.com/test?w=200&h=300")) {
65+
assertTrue("failed test on url: " + url, false);
66+
}
6567
}
6668

6769
public void testAppendUrlParameters2() {
6870
Map<String, String> params = new HashMap<>();
6971
params.put("h", "300");
7072
params.put("w", "200");
7173
String url = UrlUtils.appendUrlParameters("/relative/test", params);
72-
assertEquals("/relative/test?h=300&w=200", url);
74+
if (!url.equals("/relative/test?h=300&w=200") && !url.equals("/relative/test?w=200&h=300")) {
75+
assertTrue("failed test on url: " + url, false);
76+
}
7377
}
7478
}

0 commit comments

Comments
 (0)