Skip to content

Commit

Permalink
add buffalo dev yml back
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin <kevin@stealsyour.pw>
  • Loading branch information
thatarchguy committed Oct 3, 2019
1 parent 92e0372 commit 67fd0cf
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 4 deletions.
21 changes: 21 additions & 0 deletions .buffalo.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
app_root: .
ignored_folders:
- vendor
- log
- logs
- assets
- public
- grifts
- tmp
- bin
- node_modules
- .sass-cache
included_extensions:
- .go
- .env
build_path: tmp
build_delay: 200ns
binary_name: swagip-build
command_flags: []
enable_colors: true
log_name: buffalo
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,29 @@ install:
- go get $(go list ./... | grep -v /vendor/)

script: buffalo test



language: go

go:
- "1.11.x"

env:
- GO_ENV=test

before_script:
- mkdir -p $TRAVIS_BUILD_DIR/public/assets

go_import_path: github.com/StackFocus/SwagIP-go

install:
- go get github.com/gobuffalo/buffalo/buffalo
{{- if .opts.App.WithDep }}
- go get github.com/golang/dep/cmd/dep
- dep ensure
{{- else }}
- go get $(go list ./... | grep -v /vendor/)
{{- end }}

script: buffalo test
11 changes: 7 additions & 4 deletions actions/home_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package actions

func (as *ActionSuite) Test_CLIRootHandler() {
as.Willie.Headers["User-Agent"] = "curl"
res := as.JSON("/").Get()
req := as.JSON("/")
req.Headers["User-Agent"] = "curl"

res := req.Get()
as.Equal(200, res.Code)
as.Equal("", res.Body.String())
}
Expand All @@ -14,8 +16,9 @@ func (as *ActionSuite) Test_RootHandler() {
}

func (as *ActionSuite) Test_AllHeadersHandler() {
as.Willie.Headers["User-Agent"] = "curl"
res := as.HTML("/all").Get()
req := as.HTML("/all")
req.Headers["User-Agent"] = "curl"
res := req.Get()
as.Equal(200, res.Code)
as.Contains(res.Body.String(), "user-agent: curl")
}

0 comments on commit 67fd0cf

Please sign in to comment.