Skip to content

Commit

Permalink
refactor: replaced space object in getSpaceByIdForAccount test by…
Browse files Browse the repository at this point in the history
… a space without specials
  • Loading branch information
joragua committed Feb 5, 2025
1 parent a5e60cc commit d9bf1dd
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* @author Jorge Aguado Recio
*
* Copyright (C) 2024 ownCloud GmbH.
* Copyright (C) 2025 ownCloud GmbH.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
Expand Down Expand Up @@ -221,14 +221,14 @@ class OCSpacesRepositoryTest {
@Test
fun `getSpaceByIdForAccount returns an OCSpace`() {
every {
localSpacesDataSource.getSpaceByIdForAccount(OC_SPACE_PROJECT_WITH_IMAGE.id, OC_ACCOUNT_NAME)
} returns OC_SPACE_PROJECT_WITH_IMAGE
localSpacesDataSource.getSpaceByIdForAccount(OC_SPACE_PERSONAL.id, OC_ACCOUNT_NAME)
} returns OC_SPACE_PERSONAL

val space = ocSpacesRepository.getSpaceByIdForAccount(OC_SPACE_PROJECT_WITH_IMAGE.id, OC_ACCOUNT_NAME)
assertEquals(OC_SPACE_PROJECT_WITH_IMAGE, space)
val space = ocSpacesRepository.getSpaceByIdForAccount(OC_SPACE_PERSONAL.id, OC_ACCOUNT_NAME)
assertEquals(OC_SPACE_PERSONAL, space)

verify(exactly = 1) {
localSpacesDataSource.getSpaceByIdForAccount(OC_SPACE_PROJECT_WITH_IMAGE.id, OC_ACCOUNT_NAME)
localSpacesDataSource.getSpaceByIdForAccount(OC_SPACE_PERSONAL.id, OC_ACCOUNT_NAME)
}
}

Expand Down

0 comments on commit d9bf1dd

Please sign in to comment.