@@ -31,6 +31,7 @@ import com.owncloud.android.testutil.OC_SPACE_PERSONAL
3131import com.owncloud.android.testutil.OC_SPACE_PERSONAL_WITH_LIMITED_QUOTA
3232import com.owncloud.android.testutil.OC_SPACE_PERSONAL_WITH_UNLIMITED_QUOTA
3333import com.owncloud.android.testutil.OC_SPACE_PROJECT_WITH_IMAGE
34+ import com.owncloud.android.testutil.OC_USER_GROUPS
3435import com.owncloud.android.testutil.OC_USER_ID
3536import com.owncloud.android.testutil.OC_USER_QUOTA_LIMITED
3637import com.owncloud.android.testutil.OC_USER_QUOTA_UNLIMITED
@@ -58,17 +59,17 @@ class OCSpacesRepositoryTest {
5859 @Test
5960 fun `refreshSpacesForAccount refreshes spaces for account correctly when multipersonal is enabled` () {
6061 every {
61- remoteSpacesDataSource.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID )
62+ remoteSpacesDataSource.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID , OC_USER_GROUPS )
6263 } returns listOf (OC_SPACE_PERSONAL )
6364
6465 every {
6566 localCapabilitiesDataSource.getCapabilitiesForAccount(OC_ACCOUNT_NAME )
6667 } returns OC_CAPABILITY_WITH_MULTIPERSONAL_ENABLED
6768
68- ocSpacesRepository.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID )
69+ ocSpacesRepository.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID , OC_USER_GROUPS )
6970
7071 verify(exactly = 1 ) {
71- remoteSpacesDataSource.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID )
72+ remoteSpacesDataSource.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID , OC_USER_GROUPS )
7273 localSpacesDataSource.saveSpacesForAccount(listOf (OC_SPACE_PERSONAL ))
7374 localCapabilitiesDataSource.getCapabilitiesForAccount(OC_ACCOUNT_NAME )
7475 localUserDataSource.saveQuotaForAccount(OC_ACCOUNT_NAME , OC_USER_QUOTA_WITHOUT_PERSONAL )
@@ -78,17 +79,17 @@ class OCSpacesRepositoryTest {
7879 @Test
7980 fun `refreshSpacesForAccount refreshes spaces for account correctly when quota is unlimited` () {
8081 every {
81- remoteSpacesDataSource.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID )
82+ remoteSpacesDataSource.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID , OC_USER_GROUPS )
8283 } returns listOf (OC_SPACE_PERSONAL_WITH_UNLIMITED_QUOTA )
8384
8485 every {
8586 localCapabilitiesDataSource.getCapabilitiesForAccount(OC_ACCOUNT_NAME )
8687 } returns OC_CAPABILITY
8788
88- ocSpacesRepository.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID )
89+ ocSpacesRepository.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID , OC_USER_GROUPS )
8990
9091 verify(exactly = 1 ) {
91- remoteSpacesDataSource.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID )
92+ remoteSpacesDataSource.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID , OC_USER_GROUPS )
9293 localSpacesDataSource.saveSpacesForAccount(listOf (OC_SPACE_PERSONAL_WITH_UNLIMITED_QUOTA ))
9394 localCapabilitiesDataSource.getCapabilitiesForAccount(OC_ACCOUNT_NAME )
9495 localUserDataSource.saveQuotaForAccount(OC_ACCOUNT_NAME , OC_USER_QUOTA_UNLIMITED )
@@ -98,17 +99,17 @@ class OCSpacesRepositoryTest {
9899 @Test
99100 fun `refreshSpacesForAccount refreshes spaces for account correctly when quota is limited` () {
100101 every {
101- remoteSpacesDataSource.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID )
102+ remoteSpacesDataSource.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID , OC_USER_GROUPS )
102103 } returns listOf (OC_SPACE_PERSONAL_WITH_LIMITED_QUOTA )
103104
104105 every {
105106 localCapabilitiesDataSource.getCapabilitiesForAccount(OC_ACCOUNT_NAME )
106107 } returns OC_CAPABILITY
107108
108- ocSpacesRepository.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID )
109+ ocSpacesRepository.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID , OC_USER_GROUPS )
109110
110111 verify(exactly = 1 ) {
111- remoteSpacesDataSource.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID )
112+ remoteSpacesDataSource.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID , OC_USER_GROUPS )
112113 localSpacesDataSource.saveSpacesForAccount(listOf (OC_SPACE_PERSONAL_WITH_LIMITED_QUOTA ))
113114 localCapabilitiesDataSource.getCapabilitiesForAccount(OC_ACCOUNT_NAME )
114115 localUserDataSource.saveQuotaForAccount(OC_ACCOUNT_NAME , OC_USER_QUOTA_LIMITED )
@@ -118,17 +119,17 @@ class OCSpacesRepositoryTest {
118119 @Test
119120 fun `refreshSpacesForAccount refreshes spaces for account correctly when personal space does not exist` () {
120121 every {
121- remoteSpacesDataSource.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID )
122+ remoteSpacesDataSource.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID , OC_USER_GROUPS )
122123 } returns listOf (OC_SPACE_PROJECT_WITH_IMAGE )
123124
124125 every {
125126 localCapabilitiesDataSource.getCapabilitiesForAccount(OC_ACCOUNT_NAME )
126127 } returns OC_CAPABILITY
127128
128- ocSpacesRepository.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID )
129+ ocSpacesRepository.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID , OC_USER_GROUPS )
129130
130131 verify(exactly = 1 ) {
131- remoteSpacesDataSource.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID )
132+ remoteSpacesDataSource.refreshSpacesForAccount(OC_ACCOUNT_NAME , OC_USER_ID , OC_USER_GROUPS )
132133 localSpacesDataSource.saveSpacesForAccount(listOf (OC_SPACE_PROJECT_WITH_IMAGE ))
133134 localCapabilitiesDataSource.getCapabilitiesForAccount(OC_ACCOUNT_NAME )
134135 localUserDataSource.saveQuotaForAccount(OC_ACCOUNT_NAME , OC_USER_QUOTA_WITHOUT_PERSONAL )
0 commit comments