File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,21 @@ - (void)didSubscribeWithDisposable:(RACCompoundDisposable *)disposable {
96
96
qck_beforeEach (^{
97
97
subject = [RACReplaySubject replaySubjectWithCapacity: 1 ];
98
98
});
99
+
100
+ qck_it (@" should send same latest value to multiple subscribers in another subscription" , ^{
101
+ __block NSMutableArray *values = [NSMutableArray array ];
102
+
103
+ [subject subscribeNext: ^(id _Nullable item1) {
104
+ [values addObject: item1];
105
+ [[subject take: 1 ] subscribeNext: ^(id _Nullable item2) {
106
+ [values addObject: item2];
107
+ }];
108
+ }];
109
+ [subject sendNext: @1 ];
110
+ [subject sendNext: @2 ];
111
+
112
+ expect (values).to (equal (@[@1 , @1 , @2 , @2 ]));
113
+ });
99
114
100
115
qck_it (@" should send the last value" , ^{
101
116
id firstValue = @" blah" ;
You can’t perform that action at this time.
0 commit comments