On 8 May 2014, at 23:24, Adam Cox wrote:

>> +
>> +    NSNumber *totalReplicated = @4;
>> +
>> +    //check for each doc
>> +    NSArray *docids = @[[NSString stringWithFormat:@"doc-%i", 1],
>> +                        [NSString stringWithFormat:@"doc-%i", 3],
>> +                        [NSString stringWithFormat:@"doc-%i", 13],
>> +                        [NSString stringWithFormat:@"doc-%i", 23]];
>> +
>> +    NSArray *localDocs = [self.datastore 
>> getDocumentsWithIds:docids];
>> +    STAssertNotNil(localDocs, @"nil");
>> +    STAssertTrue(localDocs.count == [totalReplicated integerValue], 
>> @"unexpected number of docs: %@",localDocs.count);
>> +    STAssertTrue(self.datastore.documentCount == [totalReplicated 
>> integerValue],
>> +                 @"Incorrect number of documents created %lu", 
>> self.datastore.documentCount);
>> +
>> +    //set up filter for range between ndocs/2 and ndocs
>
> yeah, i guess this isn't really testing much. i think my thought was 
> to make sure i didn't pick some set of numbers that magically worked 
> but would otherwise normally fail. i guess i could randomize those. 
> but i think that's overkill.

I'd agree testing randomised values is useful in many cases. I'm not 
sure about this case, however, given that you are really testing the 
filter function at the CouchDB end by sending different parameters to 
the filter function in the replication?