Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
esell committed Apr 4, 2019
1 parent 19a50ef commit 59b545e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions main_test.go
@@ -0,0 +1,17 @@
package main

import "testing"

func TestSubExists(t *testing.T) {
dummyRecords := make([]DomainRecord, 0)

doesExist, recID := subExists(dummyRecords)

if doesExist {
t.Errorf("subExists() returned true, should have been false")
}

if recID != 0 {
t.Errorf("subExists() returned %v for recID, should be 0", recID)
}
}

0 comments on commit 59b545e

Please sign in to comment.