test(adif): assert FREQ_RX reaches the forwarded record too
The fix filled both halves of the receive side, but the test only proved BAND_RX came out the other end. FREQ_RX is the half the question was really about.
This commit is contained in:
+7
-2
@@ -20,10 +20,15 @@ func TestFillRXDefaults(t *testing.T) {
|
||||
if q.FreqRXHz == nil || *q.FreqRXHz != hz {
|
||||
t.Errorf("FreqRXHz = %v, want %d", q.FreqRXHz, hz)
|
||||
}
|
||||
rec := adif.SingleRecordADIF(q)
|
||||
if !strings.Contains(strings.ToUpper(rec), "<BAND_RX:3>20M") {
|
||||
// Assert on the RECORD another logger reads, not merely on the struct:
|
||||
// both halves of the receive side have to reach it.
|
||||
rec := strings.ToUpper(adif.SingleRecordADIF(q))
|
||||
if !strings.Contains(rec, "<BAND_RX:3>20M") {
|
||||
t.Errorf("BAND_RX missing from the forwarded record:\n%s", rec)
|
||||
}
|
||||
if !strings.Contains(rec, "<FREQ_RX:9>14.074000") {
|
||||
t.Errorf("FREQ_RX missing from the forwarded record:\n%s", rec)
|
||||
}
|
||||
}
|
||||
|
||||
// A genuine split contact keeps what it was given.
|
||||
|
||||
Reference in New Issue
Block a user