1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-26 01:28:50 -05:00

Worked around API7/API10 differences in unit test

GMT-dates are formatted without "+00:00" offset in API7 emulators.
This commit is contained in:
cketti 2012-06-09 00:39:15 +02:00
parent fb1bd9f913
commit 609cdf6bc5

View File

@ -111,7 +111,7 @@ public class ViewablesTest extends AndroidTestCase {
public void testTextPlusRfc822Message() throws MessagingException { public void testTextPlusRfc822Message() throws MessagingException {
K9Activity.setLanguage(getContext(), "en"); K9Activity.setLanguage(getContext(), "en");
Locale.setDefault(Locale.US); Locale.setDefault(Locale.US);
TimeZone.setDefault(TimeZone.getTimeZone("GMT")); TimeZone.setDefault(TimeZone.getTimeZone("GMT+01:00"));
String bodyText = "Some text here"; String bodyText = "Some text here";
String innerBodyText = "Hey there. I'm inside a message/rfc822 (inline) attachment."; String innerBodyText = "Hey there. I'm inside a message/rfc822 (inline) attachment.";
@ -152,7 +152,7 @@ public class ViewablesTest extends AndroidTestCase {
"\n\n" + "\n\n" +
"From: from@example.com" + "\n" + "From: from@example.com" + "\n" +
"To: to@example.com" + "\n" + "To: to@example.com" + "\n" +
"Sent: Sat Mar 17 00:00:00 GMT+00:00 2012" + "\n" + "Sent: Sat Mar 17 00:00:00 GMT+01:00 2012" + "\n" +
"Subject: Subject" + "\n" + "Subject: Subject" + "\n" +
"\n" + "\n" +
innerBodyText; innerBodyText;
@ -173,7 +173,7 @@ public class ViewablesTest extends AndroidTestCase {
"<td>to@example.com</td>" + "<td>to@example.com</td>" +
"</tr><tr>" + "</tr><tr>" +
"<th style=\"text-align: left; vertical-align: top;\">Sent:</th>" + "<th style=\"text-align: left; vertical-align: top;\">Sent:</th>" +
"<td>Sat Mar 17 00:00:00 GMT+00:00 2012</td>" + "<td>Sat Mar 17 00:00:00 GMT+01:00 2012</td>" +
"</tr><tr>" + "</tr><tr>" +
"<th style=\"text-align: left; vertical-align: top;\">Subject:</th>" + "<th style=\"text-align: left; vertical-align: top;\">Subject:</th>" +
"<td>Subject</td>" + "<td>Subject</td>" +