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
78866288
Commit
78866288
authored
Sep 18, 2017
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update EditMessageInteractorTest.kt
parent
f7a26398
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
EditMessageInteractorTest.kt
...chat/rocket/core/interactors/EditMessageInteractorTest.kt
+7
-7
No files found.
rocket-chat-core/src/test/java/chat/rocket/core/interactors/EditMessageInteractorTest.kt
View file @
78866288
...
...
@@ -67,7 +67,7 @@ class EditMessageInteractorTest {
val
allowEdit
=
allowEditPublicSettings
(
true
)
val
allowEditTimeout
=
allowEditTimeLimitPublicSetting
()
`when`
(
userRepository
.
current
).
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
userRepository
.
getCurrent
()
).
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
publicSettingRepository
.
getById
(
PublicSettingsConstants
.
Message
.
ALLOW_EDITING
))
.
thenReturn
(
Single
.
just
(
Optional
.
of
(
allowEdit
)))
`when`
(
publicSettingRepository
.
getById
(
PublicSettingsConstants
.
Message
.
ALLOW_EDITING_BLOCK_TIMEOUT
))
...
...
@@ -93,7 +93,7 @@ class EditMessageInteractorTest {
val
allowEdit
=
allowEditPublicSettings
(
false
)
val
allowEditTimeout
=
allowEditTimeLimitPublicSetting
()
`when`
(
userRepository
.
current
).
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
userRepository
.
getCurrent
()
).
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
publicSettingRepository
.
getById
(
PublicSettingsConstants
.
Message
.
ALLOW_EDITING
))
.
thenReturn
(
Single
.
just
(
Optional
.
of
(
allowEdit
)))
`when`
(
publicSettingRepository
.
getById
(
PublicSettingsConstants
.
Message
.
ALLOW_EDITING_BLOCK_TIMEOUT
))
...
...
@@ -123,7 +123,7 @@ class EditMessageInteractorTest {
val
allowEdit
=
allowEditPublicSettings
(
true
)
val
allowEditTimeout
=
allowEditTimeLimitPublicSetting
(
1
)
`when`
(
userRepository
.
current
).
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
userRepository
.
getCurrent
()
).
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
publicSettingRepository
.
getById
(
PublicSettingsConstants
.
Message
.
ALLOW_EDITING
))
.
thenReturn
(
Single
.
just
(
Optional
.
of
(
allowEdit
)))
`when`
(
publicSettingRepository
.
getById
(
PublicSettingsConstants
.
Message
.
ALLOW_EDITING_BLOCK_TIMEOUT
))
...
...
@@ -155,7 +155,7 @@ class EditMessageInteractorTest {
val
anotherUser
=
mock
(
User
::
class
.
java
)
`when`
(
anotherUser
.
id
).
thenReturn
(
"another id"
)
`when`
(
userRepository
.
current
).
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
anotherUser
)))
`when`
(
userRepository
.
getCurrent
()
).
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
anotherUser
)))
`when`
(
publicSettingRepository
.
getById
(
PublicSettingsConstants
.
Message
.
ALLOW_EDITING
))
.
thenReturn
(
Single
.
just
(
Optional
.
of
(
allowEdit
)))
`when`
(
publicSettingRepository
.
getById
(
PublicSettingsConstants
.
Message
.
ALLOW_EDITING_BLOCK_TIMEOUT
))
...
...
@@ -184,7 +184,7 @@ class EditMessageInteractorTest {
val
allowEdit
=
allowEditPublicSettings
(
true
)
val
allowEditTimeout
=
allowEditTimeLimitPublicSetting
()
`when`
(
userRepository
.
current
).
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
userRepository
.
getCurrent
()
).
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
publicSettingRepository
.
getById
(
PublicSettingsConstants
.
Message
.
ALLOW_EDITING
))
.
thenReturn
(
Single
.
just
(
Optional
.
of
(
allowEdit
)))
`when`
(
publicSettingRepository
.
getById
(
PublicSettingsConstants
.
Message
.
ALLOW_EDITING_BLOCK_TIMEOUT
))
...
...
@@ -213,7 +213,7 @@ class EditMessageInteractorTest {
val
allowEdit
=
allowEditPublicSettings
(
true
)
val
allowEditTimeout
=
allowEditTimeLimitPublicSetting
()
`when`
(
userRepository
.
current
).
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
userRepository
.
getCurrent
()
).
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
publicSettingRepository
.
getById
(
PublicSettingsConstants
.
Message
.
ALLOW_EDITING
))
.
thenReturn
(
Single
.
just
(
Optional
.
of
(
allowEdit
)))
`when`
(
publicSettingRepository
.
getById
(
PublicSettingsConstants
.
Message
.
ALLOW_EDITING_BLOCK_TIMEOUT
))
...
...
@@ -242,7 +242,7 @@ class EditMessageInteractorTest {
val
allowEdit
=
allowEditPublicSettings
(
false
)
val
allowEditTimeout
=
allowEditTimeLimitPublicSetting
()
`when`
(
userRepository
.
current
).
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
userRepository
.
getCurrent
()
).
thenReturn
(
Flowable
.
just
(
Optional
.
of
(
user
)))
`when`
(
publicSettingRepository
.
getById
(
PublicSettingsConstants
.
Message
.
ALLOW_EDITING
))
.
thenReturn
(
Single
.
just
(
Optional
.
of
(
allowEdit
)))
`when`
(
publicSettingRepository
.
getById
(
PublicSettingsConstants
.
Message
.
ALLOW_EDITING_BLOCK_TIMEOUT
))
...
...
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