From 8a318fb20d2bc5e97080cca0419a2ba4818e9726 Mon Sep 17 00:00:00 2001 From: Victor Andreasson Date: Mon, 25 Nov 2024 17:04:43 +0100 Subject: [PATCH] Remove GitRepo-specific tests --- .../com/orgzly/android/repos/GitRepoTest.kt | 36 ------------------- 1 file changed, 36 deletions(-) diff --git a/app/src/test/java/com/orgzly/android/repos/GitRepoTest.kt b/app/src/test/java/com/orgzly/android/repos/GitRepoTest.kt index 207aee9e..da127b2c 100644 --- a/app/src/test/java/com/orgzly/android/repos/GitRepoTest.kt +++ b/app/src/test/java/com/orgzly/android/repos/GitRepoTest.kt @@ -97,40 +97,4 @@ class GitRepoTest : SyncRepoTest { gitFileSynchronizer.mergeWithRemote() return expectedRookUri.toString() } - - /** - * Ensure we support syncing to a new, empty Git repo. - * Also tests that a book without a link is linked and synced, if possible. - */ - @Test - fun testSyncRepo_repoHasNoCommits() { - testUtils.setupBook("A Book", "...") - syncRepo.syncRepo(dataRepository) - val bookView = dataRepository.getBooks()[0] - Assert.assertEquals(syncRepo.uri.toString(), bookView.linkRepo!!.url) - Assert.assertNotNull(bookView.syncedTo?.revision) - Assert.assertTrue(bookView.book.lastAction!!.message.contains("Saved to ")) - } - - @Test - fun testSyncRepo_bookWithoutLinkAndMultipleRepos() { - // Add a second repo - testUtils.setupRepo(RepoType.MOCK, "mock://repo") - testUtils.setupBook("A Book", "...") - - syncRepo.syncRepo(dataRepository) - - val bookView = dataRepository.getBooks()[0] - Assert.assertEquals(BookAction.Type.ERROR, bookView.book.lastAction!!.type) - Assert.assertTrue(bookView.book.lastAction!!.message.contains("multiple repositories")) - } - - /** - * The very first sync is special, since the remote head has not changed since cloning, but - * we want to be sure that all books are loaded. - */ - @Test - fun testSyncRepo_firstSyncAfterCloning() { - return // TODO - } }