summaryrefslogtreecommitdiffstats
path: root/apps/federation/tests
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2016-02-26 17:02:13 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2016-02-26 20:00:13 +0100
commiteccd7cf6548e1ea639aea48cbf7e52e95dc98c11 (patch)
tree68c58394c820e1ce6bc8eee07e4747875da08be0 /apps/federation/tests
parent62d7885c3b13d7d2acf33f80e91016a82cc8a7c0 (diff)
downloadnextcloud-server-eccd7cf6548e1ea639aea48cbf7e52e95dc98c11.tar.gz
nextcloud-server-eccd7cf6548e1ea639aea48cbf7e52e95dc98c11.zip
reuse the url_hash instead of calculating a new hash for the address book
Diffstat (limited to 'apps/federation/tests')
-rw-r--r--apps/federation/tests/lib/dbhandlertest.php14
-rw-r--r--apps/federation/tests/lib/syncfederationaddressbookstest.php2
2 files changed, 9 insertions, 7 deletions
diff --git a/apps/federation/tests/lib/dbhandlertest.php b/apps/federation/tests/lib/dbhandlertest.php
index 6fe5d9ea8ef..ee28da8e02a 100644
--- a/apps/federation/tests/lib/dbhandlertest.php
+++ b/apps/federation/tests/lib/dbhandlertest.php
@@ -89,9 +89,9 @@ class DbHandlerTest extends TestCase {
public function dataTestAddServer() {
return [
- ['http://owncloud.org', 'http://owncloud.org', md5('owncloud.org')],
- ['https://owncloud.org', 'https://owncloud.org', md5('owncloud.org')],
- ['http://owncloud.org/', 'http://owncloud.org', md5('owncloud.org')],
+ ['http://owncloud.org', 'http://owncloud.org', sha1('owncloud.org')],
+ ['https://owncloud.org', 'https://owncloud.org', sha1('owncloud.org')],
+ ['http://owncloud.org/', 'http://owncloud.org', sha1('owncloud.org')],
];
}
@@ -233,10 +233,10 @@ class DbHandlerTest extends TestCase {
public function dataTestHash() {
return [
- ['server1', md5('server1')],
- ['http://server1', md5('server1')],
- ['https://server1', md5('server1')],
- ['http://server1/', md5('server1')],
+ ['server1', sha1('server1')],
+ ['http://server1', sha1('server1')],
+ ['https://server1', sha1('server1')],
+ ['http://server1/', sha1('server1')],
];
}
diff --git a/apps/federation/tests/lib/syncfederationaddressbookstest.php b/apps/federation/tests/lib/syncfederationaddressbookstest.php
index 770896535fa..9290bad8bd6 100644
--- a/apps/federation/tests/lib/syncfederationaddressbookstest.php
+++ b/apps/federation/tests/lib/syncfederationaddressbookstest.php
@@ -19,6 +19,7 @@ class SyncFederationAddressbooksTest extends \Test\TestCase {
willReturn([
[
'url' => 'https://cloud.drop.box',
+ 'url_hash' => 'sha1',
'shared_secret' => 'iloveowncloud',
'sync_token' => '0'
]
@@ -47,6 +48,7 @@ class SyncFederationAddressbooksTest extends \Test\TestCase {
willReturn([
[
'url' => 'https://cloud.drop.box',
+ 'url_hash' => 'sha1',
'shared_secret' => 'iloveowncloud',
'sync_token' => '0'
]