package qso

import "testing"

// Mode, submode and RST are repair fields: an import that mapped every contact
// to SSB, or an ADIF that carried no MODE, is fixed in one pass instead of one
// row at a time. They were excluded as "per-QSO", which confused describing a
// QSO with repairing a batch of them.
func TestModeAndRSTAreBulkEditable(t *testing.T) {
	for _, col := range []string{"mode", "submode", "rst_sent", "rst_rcvd"} {
		if !bulkEditableCols[col] {
			t.Errorf("%s should be bulk-editable", col)
		}
	}
}

// Band must NOT be bulk-editable on its own: it travels with the frequency
// through BulkSetFrequency. A band contradicting its own frequency is invalid
// ADIF, and every export would carry the contradiction out into the world.
func TestBandIsNotBulkEditableAlone(t *testing.T) {
	for _, col := range []string{"band", "freq_hz", "callsign", "qso_date"} {
		if bulkEditableCols[col] {
			t.Errorf("%s must not be bulk-editable on its own", col)
		}
	}
}
