Adds sample test to check if URLs are validated
This commit is contained in:
parent
a2c5560554
commit
9861d95009
2 changed files with 14 additions and 3 deletions
11
internal/feed_test.go
Normal file
11
internal/feed_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package feed
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestAdd(t *testing.T) {
|
||||
gotErr := Add("gibberish")
|
||||
|
||||
if gotErr == nil {
|
||||
t.Errorf("Expected Add function to throw an error if an invalid URL is provided")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue