Skip to content

Commit 2e5c028

Browse files
committed
merge tests
1 parent 0398758 commit 2e5c028

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

Modules/Tests/YosemiteTests/PointOfSale/PointOfSaleSettingsServiceTests.swift

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,6 @@ struct PointOfSaleSettingsServiceTests {
1515
settingStoreMethods: settingStoreMethods)
1616
}
1717

18-
@Test func retrievePointOfSaleSettings_when_successful_then_returns_expected_settings() async throws {
19-
// Given
20-
let expectedSettings = makeSiteSettings()
21-
settingStoreMethods.retrievePointOfSaleSettingsResult = .success(expectedSettings)
22-
23-
// When
24-
let settings = try await sut.retrievePointOfSaleSettings()
25-
26-
// Then
27-
#expect(settingStoreMethods.retrievePointOfSaleSettingsCalled)
28-
#expect(settingStoreMethods.retrievePointOfSaleSettingsSiteID == sampleSiteID)
29-
#expect(settings == expectedSettings)
30-
}
31-
3218
@Test func retrievePointOfSaleSettings_when_empty_settings_then_returns_empty_array() async throws {
3319
// Given
3420
settingStoreMethods.retrievePointOfSaleSettingsResult = .success([])
@@ -78,20 +64,20 @@ struct PointOfSaleSettingsServiceTests {
7864
}
7965
}
8066

81-
@Test func retrievePointOfSaleSettings_with_complete_pos_settings_then_returns_all_settings() async throws {
67+
@Test func retrievePointOfSaleSettings_with_expected_pos_settings_then_returns_all_settings() async throws {
8268
// Given
83-
let completeSettings = makeSiteSettings()
84-
settingStoreMethods.retrievePointOfSaleSettingsResult = .success(completeSettings)
69+
let expectedSettings = makeSiteSettings()
70+
settingStoreMethods.retrievePointOfSaleSettingsResult = .success(expectedSettings)
8571

8672
// When
8773
let settings = try await sut.retrievePointOfSaleSettings()
8874

8975
// Then
9076
#expect(settingStoreMethods.retrievePointOfSaleSettingsCalled)
77+
#expect(settingStoreMethods.retrievePointOfSaleSettingsSiteID == sampleSiteID)
9178
#expect(settings.count == 5)
92-
#expect(settings == completeSettings)
79+
#expect(settings == expectedSettings)
9380

94-
// Verify specific settings
9581
let storeNameSetting = settings.first { $0.settingID == "woocommerce_pos_store_name" }
9682
#expect(storeNameSetting?.value == "WooCommerce Store")
9783

0 commit comments

Comments
 (0)