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
22
22
23
23
/* *
24
24
* 1. Success (They are the author)
25
- * 2. Failure (They are not the author)
25
+ * 2. Success (They are not the author)
26
26
* 3. Failure (AuthToken is null)
27
27
* 4. Failure (Some random error)
28
28
*/
@@ -87,7 +87,7 @@ class IsAuthorOfBlogPostTest {
87
87
}
88
88
89
89
@Test
90
- fun failure_notTheAuthor () = runBlocking {
90
+ fun success_notTheAuthor () = runBlocking {
91
91
// condition the response
92
92
mockWebServer.enqueue(
93
93
MockResponse ()
@@ -109,11 +109,11 @@ class IsAuthorOfBlogPostTest {
109
109
// first emission should be `loading`
110
110
assert (emissions[0 ].isLoading)
111
111
112
- // confirm second emission is boolean with error dialog
112
+ // confirm second emission is boolean with success message
113
113
assert (emissions[1 ].data == false )
114
114
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 )
117
117
118
118
119
119
// loading done
You can’t perform that action at this time.
0 commit comments