Skip to content

Commit

Permalink
Add test for provider city
Browse files Browse the repository at this point in the history
  • Loading branch information
mpchadwick committed Nov 17, 2020
1 parent 572c752 commit 2cfeb94
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,10 @@ func TestGet(t *testing.T) {
if m, _ := regexp.MatchString(rx3, r14); !m {
t.Errorf("Expected %v to match %v", r14, rx3)
}

// https://github.com/dmgk/faker/blob/master/address_test.go#L10
r15 := provider.Get("city")
if m, _ := regexp.MatchString(rx1, r15); !m {
t.Errorf("Expected %v to match %v", r15, rx1)
}
}

0 comments on commit 2cfeb94

Please sign in to comment.