The affective state of animals, that is, their mood and emotions, is altered by stressful (negative) or enriching (positive) experiences. In turn, the affective state influences decision making, thereby helping animals when coping with environmental challenges and opportunities. However, it is largely unknown how social experiences modulate the affective state. Here, we performed a judgement bias test to study the effects of rearing group‐size and experimentally assigned current rank on the affective state of the cooperatively‐breeding cichlid fish Neolamprologus pulcher. To assess affective state, we developed and validated a judgement bias test for this species. Fish learned to discriminate between a positive and a negative stimulus as shown by different latencies to approach the stimulus. Furthermore, the response curves to the stimuli conformed to the ones expected in judgement bias tests: fish showed an intermediate latency to approach an ambiguous stimulus, which significantly differed from the latencies to approach the positive and the negative stimulus. Unexpectedly, there were no significant effects of rearing group size and current social rank on the affective state of N. pulcher, despite known effects of these two social parameters on behaviours and physiology of this species. This may mean that observed behavioural and physiological differences in the treatment environments do not allow valid predictions about the affective state elicited by these environments. Alternatively, it may need more socioecologically relevant testing paradigms when evaluating the valence of social environments.