File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
WordPress/src/test/java/org/wordpress/android/ui/bloggingprompts Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class BloggingPromptsPostTagProviderTest : BaseUnitTest() {
4141 }
4242
4343 @Test
44- fun `Should return the expected ReaderTag when promptIdSearchReaderTag is called` () {
44+ fun `Should return the expected ReaderTag when promptSearchReaderTag is called` () {
4545 whenever(readerUtilsWrapper.getTagFromTagUrl(any())).thenReturn(BLOGGING_PROMPT_ID_TAG )
4646 val expected = ReaderTag (
4747 BLOGGING_PROMPT_ID_TAG ,
@@ -54,7 +54,22 @@ class BloggingPromptsPostTagProviderTest : BaseUnitTest() {
5454 assertEquals(expected, actual)
5555 }
5656
57+ @Test
58+ fun `Should return the base Prompt ReaderTag when promptSearchReaderTag is called` () {
59+ whenever(readerUtilsWrapper.getTagFromTagUrl(any())).thenReturn(" " )
60+ val expected = ReaderTag (
61+ BLOGGING_PROMPT_TAG ,
62+ BLOGGING_PROMPT_TAG ,
63+ BLOGGING_PROMPT_TAG ,
64+ ReaderPostLogic .formatFullEndpointForTag(BLOGGING_PROMPT_TAG ),
65+ ReaderTagType .FOLLOWED ,
66+ )
67+ val actual = tagProvider.promptSearchReaderTag(" invalid-url" )
68+ assertEquals(expected, actual)
69+ }
70+
5771 companion object {
5872 private const val BLOGGING_PROMPT_ID_TAG = " dailyprompt-1234"
73+ private const val BLOGGING_PROMPT_TAG = " dailyprompt"
5974 }
6075}
You can’t perform that action at this time.
0 commit comments