forked from jaswdr/faker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompany_test.go
More file actions
38 lines (32 loc) · 738 Bytes
/
company_test.go
File metadata and controls
38 lines (32 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package faker
import (
"strings"
"testing"
)
func TestCompanyCatchPhrase(t *testing.T) {
f := New().Company()
phrase := f.CatchPhrase()
Expect(t, true, len(phrase) > 0)
Expect(t, 2, strings.Count(phrase, " ")) // 3 words
}
func TestCompanyBS(t *testing.T) {
f := New().Company()
bs := f.BS()
Expect(t, true, len(bs) > 0)
Expect(t, 2, strings.Count(bs, " ")) // 3 words
}
func TestCompanySuffix(t *testing.T) {
f := New().Company()
value := f.Suffix()
Expect(t, true, len(value) > 0)
}
func TestCompanyName(t *testing.T) {
f := New().Company()
value := f.Name()
Expect(t, true, len(value) > 0)
}
func TestCompanyJobTitle(t *testing.T) {
f := New().Company()
value := f.JobTitle()
Expect(t, true, len(value) > 0)
}