mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-24 07:39:54 +00:00
Using current KeePassKit, extended Tests
Signed-off-by: michael starke <michael.starke@hicknhack-software.com>
This commit is contained in:
@@ -336,8 +336,27 @@
|
||||
XCTFail(@"Missing test");
|
||||
}
|
||||
|
||||
- (void)testUpdateToInvalidNode {
|
||||
XCTAssertFalse(_undoManager.canUndo, @"Undo stack is empty");
|
||||
XCTAssertFalse(_undoManager.canRedo, @"Redo stack is empty");
|
||||
|
||||
KPKEntry *invalid = [_tree createEntry:_tree.root];
|
||||
KPKEntry *copy = [_entryA copy];
|
||||
XCTAssertThrows([_entryA updateToNode:invalid], @"Updating to a wrong node is not allowed");
|
||||
XCTAssertEqualObjects(_entryA, copy, @"Entry a has no changes after updateToNode was called with wrong node argument");
|
||||
|
||||
XCTAssertFalse(_undoManager.canUndo, @"Undo stack is empty after failed update");
|
||||
XCTAssertFalse(_undoManager.canRedo, @"Redo stack is empty after failed update");
|
||||
|
||||
}
|
||||
|
||||
- (void)testUndoRedoEditEntry {
|
||||
XCTFail(@"Missing test");
|
||||
XCTAssertFalse(_undoManager.canUndo, @"Undo stack is empty");
|
||||
XCTAssertFalse(_undoManager.canRedo, @"Redo stack is empty");
|
||||
|
||||
KPKEntry *copy = [_entryA copy];
|
||||
copy.title = @"New Title";
|
||||
copy.url = @"New URL";
|
||||
}
|
||||
|
||||
- (void)testUndoRedoEditGroup {
|
||||
|
||||
Reference in New Issue
Block a user