mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-10-04 10:06:53 -04:00
Distinguish IsExistingRepository from IsExistingMirror
This commit is contained in:
1 parent
a908649dfe
commit
ca2c97a8cf
4 files changed
+53
-24
No files matched your search
@@ -358,8 +358,11 @@ internal class RepoAdderTest {
|
||||
// repo is already in the DB
|
||||
every { repoDao.getRepository(any<String>()) } returns existingRepo
|
||||
|
||||
expectMinRepoPreview(repoName, FetchResult.IsExistingRepository, canAdd = false) {
|
||||
repoAdder.fetchRepository(url = url, proxy = null)
|
||||
val expectedFetchResult =
|
||||
if (existingRepo.address == url) FetchResult.IsExistingRepository else FetchResult.IsExistingMirror
|
||||
|
||||
expectMinRepoPreview(repoName, expectedFetchResult, canAdd = false) {
|
||||
repoAdder.fetchRepository(url = downloadUrl, proxy = null)
|
||||
}
|
||||
assertFailsWith<IllegalStateException> {
|
||||
repoAdder.addFetchedRepository()
|
||||
|
||||
Reference in new issue
Block a user