File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
app/src/test/java/com/codingwithmitch/openapi/interactors/blog Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import java.net.HttpURLConnection
2222
2323/* *
2424 * 1. Success (They are the author)
25- * 2. Failure (They are not the author)
25+ * 2. Success (They are not the author)
2626 * 3. Failure (AuthToken is null)
2727 * 4. Failure (Some random error)
2828 */
@@ -87,7 +87,7 @@ class IsAuthorOfBlogPostTest {
8787 }
8888
8989 @Test
90- fun failure_notTheAuthor () = runBlocking {
90+ fun success_notTheAuthor () = runBlocking {
9191 // condition the response
9292 mockWebServer.enqueue(
9393 MockResponse ()
@@ -109,11 +109,11 @@ class IsAuthorOfBlogPostTest {
109109 // first emission should be `loading`
110110 assert (emissions[0 ].isLoading)
111111
112- // confirm second emission is boolean with error dialog
112+ // confirm second emission is boolean with success message
113113 assert (emissions[1 ].data == false )
114114 assert (emissions[1 ].stateMessage?.response?.message == ErrorHandling .ERROR_EDIT_BLOG_NEED_PERMISSION )
115- assert (emissions[1 ].stateMessage?.response?.uiComponentType is UIComponentType .Dialog )
116- assert (emissions[1 ].stateMessage?.response?.messageType is MessageType .Error )
115+ assert (emissions[1 ].stateMessage?.response?.uiComponentType is UIComponentType .None )
116+ assert (emissions[1 ].stateMessage?.response?.messageType is MessageType .Success )
117117
118118
119119 // loading done
You can’t perform that action at this time.
0 commit comments