File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
CriticalMapsKit/Tests/AppFeatureTests Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -439,6 +439,23 @@ final class AppFeatureTests: XCTestCase {
439439 XCTAssertTrue ( val)
440440 }
441441 }
442+
443+ func test_postLocation_shouldNotPostLocationWhenObserverModeIsEnabled( ) async {
444+ var state = AppFeature . State ( )
445+ state. settingsState. userSettings. isObservationModeEnabled = true
446+
447+ let store = TestStore (
448+ initialState: state,
449+ reducer: AppFeature ( )
450+ )
451+ store. dependencies. date = . init( { @Sendable in self . date ( ) } )
452+
453+ let location = ComposableCoreLocation . Location (
454+ coordinate: . init( latitude: 11 , longitude: 21 ) ,
455+ timestamp: Date ( timeIntervalSince1970: 2 )
456+ )
457+ await store. send ( . postLocation)
458+ }
442459}
443460
444461// MARK: Helper
You can’t perform that action at this time.
0 commit comments