Skip to content

Commit

Permalink
Add test for address
Browse files Browse the repository at this point in the history
  • Loading branch information
mpchadwick committed Nov 18, 2020
1 parent 880d77b commit 4538858
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,11 @@ func TestGet(t *testing.T) {
if m, _ := regexp.MatchString(rx7, r16); !m {
t.Errorf("Expected %v to match %v", r16, rx7)
}

// https://github.com/dmgk/faker/blob/v1.2.3/address_test.go#L17
rx8 := `\d+\s[A-Z][a-z']+`
r17 := provider.Get("street")
if m, _ := regexp.MatchString(rx8, r17); !m {
t.Errorf("Expected %v to match %v", r17, rx8)
}
}

0 comments on commit 4538858

Please sign in to comment.