Cookies login and logout.
This commit is contained in:
@ -869,7 +869,9 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener, DIAwar
|
||||
return true
|
||||
}
|
||||
R.id.action_disconnect -> {
|
||||
appSettingsService.clearAll()
|
||||
CoroutineScope(Dispatchers.Main).launch {
|
||||
repository.logout()
|
||||
}
|
||||
val intent = Intent(this, LoginActivity::class.java)
|
||||
this.startActivity(intent)
|
||||
this@HomeActivity.finish()
|
||||
|
@ -1023,7 +1023,7 @@ class RepositoryTest {
|
||||
|
||||
@Test
|
||||
fun create_source() {
|
||||
coEvery { api.createSourceForVersion(any(), any(), any(), any(), any(), any()) } returns
|
||||
coEvery { api.createSourceForVersion(any(), any(), any(), any(), any()) } returns
|
||||
SuccessResponse(true)
|
||||
|
||||
initializeRepository()
|
||||
@ -1045,7 +1045,6 @@ class RepositoryTest {
|
||||
any(),
|
||||
any(),
|
||||
any(),
|
||||
any()
|
||||
)
|
||||
}
|
||||
assertSame(true, response)
|
||||
@ -1053,7 +1052,7 @@ class RepositoryTest {
|
||||
|
||||
@Test
|
||||
fun create_source_but_response_fails() {
|
||||
coEvery { api.createSourceForVersion(any(), any(), any(), any(), any(), any()) } returns
|
||||
coEvery { api.createSourceForVersion(any(), any(), any(), any(), any()) } returns
|
||||
SuccessResponse(false)
|
||||
|
||||
initializeRepository()
|
||||
@ -1075,7 +1074,6 @@ class RepositoryTest {
|
||||
any(),
|
||||
any(),
|
||||
any(),
|
||||
any()
|
||||
)
|
||||
}
|
||||
assertSame(false, response)
|
||||
@ -1083,7 +1081,7 @@ class RepositoryTest {
|
||||
|
||||
@Test
|
||||
fun create_source_without_connection() {
|
||||
coEvery { api.createSourceForVersion(any(), any(), any(), any(), any(), any()) } returns
|
||||
coEvery { api.createSourceForVersion(any(), any(), any(), any(), any()) } returns
|
||||
SuccessResponse(true)
|
||||
|
||||
initializeRepository(MutableStateFlow(false))
|
||||
@ -1104,7 +1102,6 @@ class RepositoryTest {
|
||||
any(),
|
||||
any(),
|
||||
any(),
|
||||
any(),
|
||||
any()
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user