woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
300 stars 110 forks source link

[Woo POS] Unit tests for `TotalsViewModel` #13217

Open iamgabrielma opened 2 months ago

iamgabrielma commented 2 months ago

From the refactor on https://github.com/woocommerce/woocommerce-ios/pull/13211#discussion_r1661382406 we can now test the expected functionality of this bit. A starter list can be found in TotalsViewModelTests:

    func test_isSyncingOrder() {}
    func test_startSyncOrder() {}
    func test_stopSyncOrder() {}
    func test_order() {}
    func test_formattedPrice() {}
    func test_formattedOrderTotalPrice() {}
    func test_formattedOrderTotalTaxPrice() {}
    func test_areAmountsFullyCalculated() {}
    func test_clearOrder() {}
    func test_setOrder() {}
dangermattic commented 2 months ago

Thanks for reporting! 👍