From c0e0ed3d17eab175bbf658072f3c89428883f312 Mon Sep 17 00:00:00 2001 From: Rene Pfeuffer Date: Tue, 25 Feb 2020 17:34:41 +0100 Subject: [PATCH] Fix tests --- .../sonia/scm/repository/spi/GitBrowseCommandTest.java | 8 ++++---- .../ui-webapp/src/repos/sources/modules/sources.test.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBrowseCommandTest.java b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBrowseCommandTest.java index ce8214e2fa..23d3bfabca 100644 --- a/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBrowseCommandTest.java +++ b/scm-plugins/scm-git-plugin/src/test/java/sonia/scm/repository/spi/GitBrowseCommandTest.java @@ -87,7 +87,7 @@ public class GitBrowseCommandTest extends AbstractGitCommandTestBase { assertThat(foList) .extracting("name") - .containsExactly("a.txt", "b.txt", "c", "f.txt"); + .containsExactly("c", "a.txt", "b.txt", "f.txt"); } @Test @@ -100,7 +100,7 @@ public class GitBrowseCommandTest extends AbstractGitCommandTestBase { Collection foList = root.getChildren(); assertThat(foList) .extracting("name") - .containsExactly("a.txt", "c"); + .containsExactly("c", "a.txt"); } @Test @@ -207,7 +207,7 @@ public class GitBrowseCommandTest extends AbstractGitCommandTestBase { assertThat(foList) .extracting("name") - .containsExactly("a.txt", "b.txt", "c", "f.txt"); + .containsExactly("c", "a.txt", "b.txt", "f.txt"); FileObject c = findFile(foList, "c"); @@ -262,7 +262,7 @@ public class GitBrowseCommandTest extends AbstractGitCommandTestBase { Collection foList = root.getChildren(); - assertThat(foList).extracting("name").contains("c", "f.txt"); + assertThat(foList).extracting("name").contains("b.txt", "f.txt"); assertFalse(root.isTruncated()); } diff --git a/scm-ui/ui-webapp/src/repos/sources/modules/sources.test.ts b/scm-ui/ui-webapp/src/repos/sources/modules/sources.test.ts index fdd7a9fc78..f49488a7df 100644 --- a/scm-ui/ui-webapp/src/repos/sources/modules/sources.test.ts +++ b/scm-ui/ui-webapp/src/repos/sources/modules/sources.test.ts @@ -118,7 +118,7 @@ describe("sources fetch", () => { }); it("should fetch the sources of the repository", () => { - fetchMock.getOnce(sourcesUrl, collection); + fetchMock.getOnce(sourcesUrl + "?offset=0", collection); const expectedActions = [ { @@ -182,7 +182,7 @@ describe("sources fetch", () => { }); it("should dispatch FETCH_SOURCES_FAILURE on server error", () => { - fetchMock.getOnce(sourcesUrl, { + fetchMock.getOnce(sourcesUrl + "?offset=0", { status: 500 });