Skip to content

Commit

Permalink
Merge pull request #59 from gabrielclima/master
Browse files Browse the repository at this point in the history
Unit test to check some files
  • Loading branch information
Matt Bernier committed Nov 22, 2017
2 parents 190737a + 7a32691 commit 68fc260
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions rest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/http"
"net/http/httptest"
"net/http/httputil"
"os"
"regexp"
"strings"
"testing"
Expand Down Expand Up @@ -309,6 +310,19 @@ func TestRestError(t *testing.T) {
}
}

func TestRepoFiles(t *testing.T) {
files := []string{"docker/Dockerfile", "docker/docker-compose.yml", ".env_sample",
".gitignore", ".travis.yml", ".codeclimate.yml", "CHANGELOG.md", "CODE_OF_CONDUCT.md",
"CONTRIBUTING.md", ".github/ISSUE_TEMPLATE", "LICENSE.md", ".github/PULL_REQUEST_TEMPLATE",
"README.md", "TROUBLESHOOTING.md", "USAGE.md", "USE_CASES.md"}

for _, file := range files {
if _, err := os.Stat(file); os.IsNotExist(err) {
t.Errorf("Repo file does not exist: %v", file)
}
}
}

func TestLicenseYear(t *testing.T) {
t.Parallel()
dat, err := ioutil.ReadFile("LICENSE.txt")
Expand Down

0 comments on commit 68fc260

Please sign in to comment.