When removing a key that does exist then original GitDbBranch can still find it
This commit is contained in:
parent
2305c0ed1b
commit
ac53b4679a
1 changed files with 10 additions and 0 deletions
|
@ -260,6 +260,16 @@ class GitDBTest implements WithAssertions {
|
||||||
}
|
}
|
||||||
|
|
||||||
// When removing a key that does exist then original GitDbBranch can still find it
|
// When removing a key that does exist then original GitDbBranch can still find it
|
||||||
|
@Test
|
||||||
|
void removeKey_whenExists_thenOriginalCanStillFind() throws IOException {
|
||||||
|
//given
|
||||||
|
final GitDBBranch originalBranch = gitDBBranch().put("key-name", "value");
|
||||||
|
//when
|
||||||
|
final GitDBBranch updatedBranch = originalBranch.remove("key-name");
|
||||||
|
//then
|
||||||
|
assertThat(originalBranch.get("key-name")).contains("value");
|
||||||
|
}
|
||||||
|
|
||||||
// When removing a key that does exist then the updated GitDbBranch can't find it
|
// When removing a key that does exist then the updated GitDbBranch can't find it
|
||||||
|
|
||||||
// When starting a named transaction then GitDbTransaction is returned
|
// When starting a named transaction then GitDbTransaction is returned
|
||||||
|
|
Loading…
Reference in a new issue