Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
ca13e85c
Commit
ca13e85c
authored
Sep 18, 2017
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update PermissionInteractorTest.kt
parent
78866288
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
PermissionInteractorTest.kt
.../chat/rocket/core/interactors/PermissionInteractorTest.kt
+7
-7
No files found.
rocket-chat-core/src/test/java/chat/rocket/core/interactors/PermissionInteractorTest.kt
View file @
ca13e85c
...
...
@@ -52,7 +52,7 @@ class PermissionInteractorTest {
@Test
fun
isAllowedReturnsFalseWhenWithoutCurrentUser
()
{
`when`
(
userRepository
.
current
)
`when`
(
userRepository
.
getCurrent
()
)
.
thenReturn
(
Flowable
.
just
(
Optional
.
absent
()))
val
testObserver
=
TestObserver
<
Boolean
>()
...
...
@@ -67,7 +67,7 @@ class PermissionInteractorTest {
fun
isAllowedReturnsFalseWhenWithoutRoomRoleAndPermission
()
{
val
permissionId
=
"permission"
`when`
(
userRepository
.
current
)
`when`
(
userRepository
.
getCurrent
()
)
.
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
roomRoleRepository
.
getFor
(
any
(
Room
::
class
.
java
),
any
(
User
::
class
.
java
)))
...
...
@@ -88,7 +88,7 @@ class PermissionInteractorTest {
fun
isAllowedReturnsFalseWhenWithoutRoomRole
()
{
val
permissionId
=
"permission"
`when`
(
userRepository
.
current
)
`when`
(
userRepository
.
getCurrent
()
)
.
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
roomRoleRepository
.
getFor
(
any
(
Room
::
class
.
java
),
any
(
User
::
class
.
java
)))
...
...
@@ -109,7 +109,7 @@ class PermissionInteractorTest {
fun
isAllowedReturnsFalseWhenWithoutPermission
()
{
val
permissionId
=
"permission"
`when`
(
userRepository
.
current
)
`when`
(
userRepository
.
getCurrent
()
)
.
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
roomRoleRepository
.
getFor
(
any
(
Room
::
class
.
java
),
any
(
User
::
class
.
java
)))
...
...
@@ -131,7 +131,7 @@ class PermissionInteractorTest {
val
permissionId
=
"permission"
`when`
(
userRepository
.
current
)
`when`
(
userRepository
.
getCurrent
()
)
.
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
roomRoleRepository
.
getFor
(
any
(
Room
::
class
.
java
),
any
(
User
::
class
.
java
)))
...
...
@@ -153,7 +153,7 @@ class PermissionInteractorTest {
val
permissionId
=
"permission"
`when`
(
userRepository
.
current
)
`when`
(
userRepository
.
getCurrent
()
)
.
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
roomRole
.
roles
).
thenReturn
(
getSomeRoles
())
...
...
@@ -179,7 +179,7 @@ class PermissionInteractorTest {
val
permissionId
=
"permission"
`when`
(
userRepository
.
current
)
`when`
(
userRepository
.
getCurrent
()
)
.
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
roomRole
.
roles
).
thenReturn
(
getMoreRoles
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment