Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
Fix test compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bfollington committed Feb 12, 2024
1 parent f4ff82f commit 5d304f2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 14 deletions.
13 changes: 6 additions & 7 deletions xcode/Subconscious/SubconsciousTests/TestUtilities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,15 @@ struct TestUtilities {
database: database
)


let likes = UserLikesService(
noosphere: noosphere
)
let userProfile = UserProfileService(
noosphere: noosphere,
database: database,
addressBook: addressBook
addressBook: addressBook,
userLikes: likes
)

let data = DataService(
Expand All @@ -98,12 +103,6 @@ struct TestUtilities {
noosphere: noosphere,
userProfile: userProfile
)

let likes = UserLikesService(
noosphere: noosphere,
database: database,
addressBook: addressBook
)

return DataServiceEnvironment(
data: data,
Expand Down
12 changes: 8 additions & 4 deletions xcode/Subconscious/SubconsciousTests/Tests_CardModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ final class Tests_CardModel: XCTestCase {
entry: first,
author: UserProfile.dummyData(),
related: []
)
),
liked: false
)

let second = EntryStub.dummyData()
let updated = card.update(entry: second)
let updated = card.update(entry: second, liked: true)

XCTAssert(updated.entry == second)
XCTAssert(updated.liked == true)
}

func testUpdatePrompt() throws {
Expand All @@ -33,12 +35,14 @@ final class Tests_CardModel: XCTestCase {
entry: first,
author: UserProfile.dummyData(),
related: []
)
),
liked: true
)

let second = EntryStub.dummyData()
let updated = card.update(entry: second)
let updated = card.update(entry: second, liked: false)

XCTAssert(updated.entry == second)
XCTAssert(updated.liked == false)
}
}
18 changes: 15 additions & 3 deletions xcode/Subconscious/SubconsciousTests/Tests_DataService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,14 @@ final class Tests_DataService: XCTestCase {
noosphere: noosphere,
database: database
)
let userLikes = UserLikesService(
noosphere: noosphere
)
let userProfile = UserProfileService(
noosphere: noosphere,
database: database,
addressBook: addressBook
addressBook: addressBook,
userLikes: userLikes
)

let data = DataService(
Expand Down Expand Up @@ -257,10 +261,14 @@ final class Tests_DataService: XCTestCase {
database: database
)

let userLikes = UserLikesService(
noosphere: noosphere
)
let userProfile = UserProfileService(
noosphere: noosphere,
database: database,
addressBook: addressBook
addressBook: addressBook,
userLikes: userLikes
)

let data = DataService(
Expand Down Expand Up @@ -563,10 +571,14 @@ final class Tests_DataService: XCTestCase {
database: database
)

let userLikes = UserLikesService(
noosphere: noosphere
)
let userProfile = UserProfileService(
noosphere: noosphere,
database: database,
addressBook: addressBook
addressBook: addressBook,
userLikes: userLikes
)

let data = DataService(
Expand Down

0 comments on commit 5d304f2

Please sign in to comment.