aboutsummaryrefslogtreecommitdiff
path: root/generator/generator_test.go
blob: 4cda593a112dd0189669d45be54db16ed9d64a58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package generator

import "testing"

func TestRandomWords(t *testing.T) {
	words, err := RandomWords("/usr/share/dict/words", 4)

	if err != nil {
		t.Errorf("%s", err)
	}

	if len(words) != 4 {
		t.Errorf("RandomWords does not return the correct number of words")
	}
}