Commit 184abb0b authored by Leonardo Aramaki's avatar Leonardo Aramaki

Moved all references of the demo server to open

parent 8779e638
...@@ -12,7 +12,7 @@ public class ServerPolicyHelper { ...@@ -12,7 +12,7 @@ public class ServerPolicyHelper {
public static String enforceHostname(String hostname) { public static String enforceHostname(String hostname) {
if (hostname == null) { if (hostname == null) {
return "demo.rocket.chat"; return "open.rocket.chat";
} }
return removeTrailingSlash(removeProtocol(enforceDefaultHost(hostname))); return removeTrailingSlash(removeProtocol(enforceDefaultHost(hostname)));
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<string name="dialog_user_registration_password">Password</string> <string name="dialog_user_registration_password">Password</string>
<string name="fragment_home_welcome_message">Welcome to Rocket.Chat.Android\nSelect a channel from the drawer.</string> <string name="fragment_home_welcome_message">Welcome to Rocket.Chat.Android\nSelect a channel from the drawer.</string>
<string name="fragment_input_hostname_hostname">Hostname</string> <string name="fragment_input_hostname_hostname">Hostname</string>
<string name="fragment_input_hostname_server_hint">demo.rocket.chat</string> <string name="fragment_input_hostname_server_hint">open.rocket.chat</string>
<string name="fragment_input_hostname_connect">CONNECT</string> <string name="fragment_input_hostname_connect">CONNECT</string>
<string name="fragment_login_username_or_email">Username or email</string> <string name="fragment_login_username_or_email">Username or email</string>
<string name="fragment_login_password">Password</string> <string name="fragment_login_password">Password</string>
......
...@@ -27,7 +27,7 @@ class RocketChatCacheTest { ...@@ -27,7 +27,7 @@ class RocketChatCacheTest {
@Test @Test
fun getServerList_ShouldReturnHostnameList() { fun getServerList_ShouldReturnHostnameList() {
val hostnameList = JSONObject() val hostnameList = JSONObject()
.put("http://demo.rocket.chat", "images/logo/logo.png") .put("http://open.rocket.chat", "images/logo/logo.png")
.put("http://192.168.0.6:3000", "images/icon.svg") .put("http://192.168.0.6:3000", "images/icon.svg")
.toString() .toString()
...@@ -35,7 +35,7 @@ class RocketChatCacheTest { ...@@ -35,7 +35,7 @@ class RocketChatCacheTest {
val expectedServerList = mutableListOf( val expectedServerList = mutableListOf(
Pair("http://192.168.0.6:3000", "http://192.168.0.6:3000/images/icon.svg"), Pair("http://192.168.0.6:3000", "http://192.168.0.6:3000/images/icon.svg"),
Pair("http://demo.rocket.chat", "http://demo.rocket.chat/images/logo/logo.png")) Pair("http://open.rocket.chat", "http://open.rocket.chat/images/logo/logo.png"))
val serverList = cache.serverList val serverList = cache.serverList
assertThat(serverList, equalTo(expectedServerList)) assertThat(serverList, equalTo(expectedServerList))
} }
......
...@@ -7,31 +7,31 @@ class UrlHelperTest { ...@@ -7,31 +7,31 @@ class UrlHelperTest {
@Test @Test
fun removeUriSchemeTest() { fun removeUriSchemeTest() {
assertEquals("demo.rocket.chat", UrlHelper.removeUriScheme("https://demo.rocket.chat")) assertEquals("open.rocket.chat", UrlHelper.removeUriScheme("https://open.rocket.chat"))
assertEquals("demo.rocket.chat", UrlHelper.removeUriScheme("http://demo.rocket.chat")) assertEquals("open.rocket.chat", UrlHelper.removeUriScheme("http://open.rocket.chat"))
assertEquals("demo.rocket.chat", UrlHelper.removeUriScheme("demo.rocket.chat")) assertEquals("open.rocket.chat", UrlHelper.removeUriScheme("open.rocket.chat"))
} }
@Test @Test
fun getSafeHostnameTest() { fun getSafeHostnameTest() {
assertEquals("https://demo.rocket.chat", UrlHelper.getSafeHostname("https://demo.rocket.chat")) assertEquals("https://open.rocket.chat", UrlHelper.getSafeHostname("https://open.rocket.chat"))
assertEquals("https://demo.rocket.chat", UrlHelper.getSafeHostname("http://demo.rocket.chat")) assertEquals("https://open.rocket.chat", UrlHelper.getSafeHostname("http://open.rocket.chat"))
assertEquals("https://demo.rocket.chat", UrlHelper.getSafeHostname("demo.rocket.chat")) assertEquals("https://open.rocket.chat", UrlHelper.getSafeHostname("open.rocket.chat"))
} }
@Test @Test
fun getUrlTest() { fun getUrlTest() {
assertEquals("https://demo.rocket.chat/GENERAL/file.txt", UrlHelper.getSafeUrl("https://demo.rocket.chat/GENERAL/file.txt")) assertEquals("https://open.rocket.chat/GENERAL/file.txt", UrlHelper.getSafeUrl("https://open.rocket.chat/GENERAL/file.txt"))
assertEquals("http://demo.rocket.chat/GENERAL/file.txt", UrlHelper.getSafeUrl("http://demo.rocket.chat/GENERAL/file.txt")) assertEquals("http://open.rocket.chat/GENERAL/file.txt", UrlHelper.getSafeUrl("http://open.rocket.chat/GENERAL/file.txt"))
assertEquals("demo.rocket.chat/GENERAL/file.txt", UrlHelper.getSafeUrl("demo.rocket.chat/GENERAL/file.txt")) assertEquals("open.rocket.chat/GENERAL/file.txt", UrlHelper.getSafeUrl("open.rocket.chat/GENERAL/file.txt"))
assertEquals("demo.rocket.chat/GENERAL/a%20sample%20file.txt", UrlHelper.getSafeUrl("demo.rocket.chat/GENERAL/a sample file.txt")) assertEquals("open.rocket.chat/GENERAL/a%20sample%20file.txt", UrlHelper.getSafeUrl("open.rocket.chat/GENERAL/a sample file.txt"))
assertEquals("demo.rocket.chat/GENERAL/file.txt", UrlHelper.getSafeUrl("demo.rocket.chat\\/GENERAL\\/file.txt")) assertEquals("open.rocket.chat/GENERAL/file.txt", UrlHelper.getSafeUrl("open.rocket.chat\\/GENERAL\\/file.txt"))
} }
@Test @Test
fun getAttachmentLinkTest() { fun getAttachmentLinkTest() {
assertEquals("https://demo.rocket.chat/file-upload/aFileId/aFileName.txt", UrlHelper.getAttachmentLink("https://demo.rocket.chat", "aFileId", "aFileName.txt")) assertEquals("https://open.rocket.chat/file-upload/aFileId/aFileName.txt", UrlHelper.getAttachmentLink("https://open.rocket.chat", "aFileId", "aFileName.txt"))
assertEquals("https://demo.rocket.chat/file-upload/aFileId/aFileName.txt", UrlHelper.getAttachmentLink("http://demo.rocket.chat", "aFileId", "aFileName.txt")) assertEquals("https://open.rocket.chat/file-upload/aFileId/aFileName.txt", UrlHelper.getAttachmentLink("http://open.rocket.chat", "aFileId", "aFileName.txt"))
assertEquals("https://demo.rocket.chat/file-upload/aFileId/aFileName.txt", UrlHelper.getAttachmentLink("demo.rocket.chat", "aFileId", "aFileName.txt")) assertEquals("https://open.rocket.chat/file-upload/aFileId/aFileName.txt", UrlHelper.getAttachmentLink("open.rocket.chat", "aFileId", "aFileName.txt"))
} }
} }
\ No newline at end of file
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/drawee_server_button" app:layout_constraintStart_toEndOf="@+id/drawee_server_button"
app:layout_constraintTop_toBottomOf="@+id/text_view_site_name_label" app:layout_constraintTop_toBottomOf="@+id/text_view_site_name_label"
tools:text="demo.rocket.chat" /> tools:text="open.rocket.chat" />
<ImageView <ImageView
android:id="@+id/selected_server_dot" android:id="@+id/selected_server_dot"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment