A code is said to be locally testable if an algorithm can distinguish between a codeword and a vector being essentially far from the code using a number of queries that is independent of the code's length. The question of characterizing codes that are locally testable is highly complex. In this work we provide a sufficient condition for linear codes to be locally testable. Our condition is based on the weight distribution (spectrum) of the code and of its dual. Codes of (large) length n and minimum distance n/2 - ⊖(√n) have size which is at most polynomial in n. We call such codes almost-orthogonal. We use our condition to show that almost-orthogonal codes are locally testable, and, moreover, their dual codes can be spanned by words of constant weights (weight of a codeword refers to the number of its non-zero coordinates). Dual-BCH(n, t) codes are generalizations of the well studied Hadamard codes (t = 1 is Hadamard). The authors of  raised the question whether Dual-BCH(n, t) codes are locally testable for constant t. As these codes are known to be almost-orthogonal, we solve this question. We further show that BCH(n, t) code is spanned by its almost shortest words, that is by codewords of weight at most 2t + 2, while the minimum weight is 2t + 1. Our results can be straightforwardly extended to Goppa codes and trace subcodes of algebraic-geometric codes.