Skip to content

Commit

Permalink
Cleanup warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bozidarsevo committed Dec 24, 2024
1 parent 13aa13a commit 5e2c4c3
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ struct EditStoreListViewModelTests {
@Test func hasChanges_returns_correct_values() {
// Given
let availableSites = [site1, site2]
let viewModel = EditStoreListViewModel(availableSites: [site1, site2],
displayedSites: [site1, site2],
let displayedSites = [site1, site2]
let viewModel = EditStoreListViewModel(availableSites: availableSites,
displayedSites: displayedSites,
currentlySelectedSite: nil,
onCompletion: {})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ final class LocallyStoredStateNameRetrieverTests: XCTestCase {
// Given
let stateCode = "TS"
let address = Address.fake().copy(state: stateCode, country: "A different country")
let stateOfACountry = StateOfACountry(code: stateCode, name: "Test State")
storageManager.insertSampleCountries(readOnlyCountries: [Country(code: "US",
name: "United States",
states: [StateOfACountry(code: stateCode, name: "Testland")])])
let stateOfACountry = StateOfACountry(code: stateCode, name: "Testland")
storageManager.insertSampleCountries(readOnlyCountries: [
Country(code: "US", name: "United States", states: [stateOfACountry])
])

// When/Then
XCTAssertNil(sut.retrieveLocallyStoredStateName(of: address))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ struct TapToPayAwarenessMomentDeterminerTests {
userDefaults.hasFirstAttempt = false

// When shouldPresent called
let shouldPresent = await sut.shouldPresent()
_ = await sut.shouldPresent()

// Then
#expect(userDefaults.hasFirstAttempt)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,9 @@ final class ProductListViewModelTests: XCTestCase {
func test_it_loads_favorite_products_on_init() {
// Given
let favoriteProductsUseCase = MockFavoriteProductsUseCase()
let viewModel = ProductListViewModel(siteID: sampleSiteID,
stores: storesManager,
favoriteProductsUseCase: favoriteProductsUseCase)
_ = ProductListViewModel(siteID: sampleSiteID,
stores: storesManager,
favoriteProductsUseCase: favoriteProductsUseCase)

// Then
waitUntil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct MockPaymentActionHandler: MockActionHandler {

func handle(action: PaymentAction) {
switch action {
case .loadSiteCurrentPlan(siteID: let siteID, completion: let completion):
case .loadSiteCurrentPlan(siteID: _, completion: let completion):
let mockPlan = WPComSitePlan(
id: "mock_plan_id",
hasDomainCredit: true,
Expand Down
2 changes: 1 addition & 1 deletion Yosemite/YosemiteTests/Stores/SystemStatusStoreTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ final class SystemStatusStoreTests: XCTestCase {
let store = SystemStatusStore(dispatcher: dispatcher, storageManager: storageManager, network: network)

// When
let result = waitFor { promise in
_ = waitFor { promise in
store.onAction(SystemStatusAction.synchronizeSystemInformation(siteID: self.sampleSiteID) { result in
promise(result)
})
Expand Down

0 comments on commit 5e2c4c3

Please sign in to comment.