Skip to content

Commit

Permalink
Test rafactored based on the behavior of the BookmarkList
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasstrba committed Dec 9, 2024
1 parent d988173 commit 0140543
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions UnitTests/Bookmarks/Model/BookmarkListTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ final class BookmarkListTests: XCTestCase {
XCTAssertEqual(items?.first?.isFavorite, newIsFavorite)
}

func testWhenMultipleBookmarksWithSameURLDifferentCasesAreInserted_ThenLowercasedItemsDictContainsFirstOne() {
func testWhenMultipleBookmarksWithSameURLDifferentCasesAreInserted_ThenLowercasedItemsDictContainsOneOfThem() {
var bookmarkList = BookmarkList()

let bookmark1 = Bookmark(id: UUID().uuidString, url: "www.Example.com", title: "Example 1", isFavorite: true)
Expand All @@ -262,8 +262,7 @@ final class BookmarkListTests: XCTestCase {
let items = bookmarkList.lowercasedItemsDict[lowercasedKey]

XCTAssertNotNil(items)
XCTAssertTrue(items?.contains(where: { $0.id == bookmark1.id }) ?? false)
XCTAssertFalse(items?.contains(where: { $0.id == bookmark2.id }) ?? false)
XCTAssert(items?.contains(where: { $0.id == bookmark1.id || $0.id == bookmark2.id}) ?? false)
}

}
Expand Down

0 comments on commit 0140543

Please sign in to comment.