File tree 2 files changed +8
-19
lines changed
owncloudData/src/test/java/com/owncloud/android/data/user/repository
owncloudTestUtil/src/main/java/com/owncloud/android/testutil
2 files changed +8
-19
lines changed Original file line number Diff line number Diff line change 4
4
* @author Abel García de Prada
5
5
* @author Jorge Aguado Recio
6
6
*
7
- * Copyright (C) 2024 ownCloud GmbH.
7
+ * Copyright (C) 2025 ownCloud GmbH.
8
8
*
9
9
* This program is free software: you can redistribute it and/or modify
10
10
* it under the terms of the GNU General Public License version 2,
@@ -113,20 +113,6 @@ class OCUserRepositoryTest {
113
113
}
114
114
}
115
115
116
- @Test
117
- fun `getStoredUserQuotaAsFlow returns a Flow with null when local datasource returns a Flow with null` () = runTest {
118
- every {
119
- localUserDataSource.getQuotaForAccountAsFlow(OC_ACCOUNT_NAME )
120
- } returns flowOf(null )
121
-
122
- val userQuota = ocUserRepository.getStoredUserQuotaAsFlow(OC_ACCOUNT_NAME ).first()
123
- assertNull(userQuota)
124
-
125
- verify(exactly = 1 ) {
126
- localUserDataSource.getQuotaForAccountAsFlow(OC_ACCOUNT_NAME )
127
- }
128
- }
129
-
130
116
@Test
131
117
fun `getAllUserQuotas returns a list of UserQuota` () {
132
118
every {
Original file line number Diff line number Diff line change 2
2
* ownCloud Android client application
3
3
*
4
4
* @author Abel García de Prada
5
- * Copyright (C) 2020 ownCloud GmbH.
5
+ * @author Jorge Aguado Recio
6
+ *
7
+ * Copyright (C) 2025 ownCloud GmbH.
6
8
*
7
9
* This program is free software: you can redistribute it and/or modify
8
10
* it under the terms of the GNU General Public License version 2,
16
18
* You should have received a copy of the GNU General Public License
17
19
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
20
*/
21
+
19
22
package com.owncloud.android.testutil
20
23
21
24
import com.owncloud.android.domain.user.model.UserAvatar
@@ -31,24 +34,24 @@ val OC_USER_INFO = UserInfo(
31
34
32
35
val OC_USER_QUOTA = UserQuota (
33
36
accountName = OC_ACCOUNT_NAME ,
34
- used = 80_000 ,
35
37
available = 200_000 ,
38
+ used = 80_000 ,
36
39
total = 280_000 ,
37
40
state = null
38
41
)
39
42
40
43
val OC_USER_QUOTA_WITHOUT_PERSONAL = UserQuota (
41
44
accountName = OC_ACCOUNT_NAME ,
42
- used = 0 ,
43
45
available = - 4L ,
46
+ used = 0 ,
44
47
total = 0 ,
45
48
state = UserQuotaState .NORMAL
46
49
)
47
50
48
51
val OC_USER_QUOTA_UNLIMITED = UserQuota (
49
52
accountName = OC_ACCOUNT_NAME ,
50
- used = 5_000 ,
51
53
available = - 3L ,
54
+ used = 5_000 ,
52
55
total = 0 ,
53
56
state = UserQuotaState .NORMAL
54
57
)
You can’t perform that action at this time.
0 commit comments