Skip to content

Commit 7610fbd

Browse files
committed
Fixing tests
1 parent 82ce3bf commit 7610fbd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

WordPress/src/test/java/org/wordpress/android/ui/reader/discover/ReaderPostCardActionsHandlerTest.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import org.mockito.kotlin.whenever
1919
import org.wordpress.android.BaseUnitTest
2020
import org.wordpress.android.datasets.ReaderBlogTableWrapper
2121
import org.wordpress.android.fluxc.Dispatcher
22+
import org.wordpress.android.fluxc.store.AccountStore
2223
import org.wordpress.android.fluxc.store.AccountStore.AddOrDeleteSubscriptionPayload.SubscriptionAction
2324
import org.wordpress.android.models.ReaderPost
2425
import org.wordpress.android.ui.pages.SnackbarMessageHolder
@@ -129,6 +130,9 @@ class ReaderPostCardActionsHandlerTest : BaseUnitTest() {
129130
@Mock
130131
private lateinit var dispatcher: Dispatcher
131132

133+
@Mock
134+
private lateinit var accountStore: AccountStore
135+
132136
@Mock
133137
private lateinit var resourceProvider: ResourceProvider
134138

@@ -155,12 +159,14 @@ class ReaderPostCardActionsHandlerTest : BaseUnitTest() {
155159
mock(),
156160
seenStatusToggleUseCase,
157161
readerBlogTableWrapper,
162+
accountStore,
158163
testDispatcher()
159164
)
160165
actionHandler.initScope(testScope())
161166
whenever(appPrefsWrapper.shouldShowBookmarksSavedLocallyDialog()).thenReturn(false)
162167
whenever(htmlMessageUtils.getHtmlMessageFromStringFormatResId(any(), anyVararg())).thenReturn(mock())
163168
whenever(readerBlogTableWrapper.getReaderBlog(any(), any())).thenReturn(mock())
169+
whenever(accountStore.hasAccessToken()).thenReturn(true)
164170
}
165171

166172
/** BOOKMARK ACTION begin **/

0 commit comments

Comments
 (0)