Skip to content

Commit

Permalink
fix: renamed swagguard tests to differentiate between node and compil…
Browse files Browse the repository at this point in the history
…er swagger code
  • Loading branch information
randomshinichi committed Jul 4, 2019
1 parent e98eb32 commit 5793b1f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions swagguard/compiler/models/error.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions swagguard/compiler_error_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package swagguard_test

import (
"fmt"
"strings"
"testing"

"github.com/aeternity/aepp-sdk-go/swagguard/compiler/client/operations"
"github.com/aeternity/aepp-sdk-go/swagguard/compiler/models"
)

func TestCompilerErrorModelDereferencing(t *testing.T) {
reason := "A Very Good Reason"
compileContractBadRequest := operations.NewCompileContractBadRequest()
err := models.Error{Reason: &reason}
compileContractBadRequest.Payload = &err
printedError := fmt.Sprintf("BadRequest %s", compileContractBadRequest)
if !strings.Contains(printedError, reason) {
t.Errorf("Expected to find %s when printing out the models.Error: got %s instead", reason, printedError)
}
}
File renamed without changes.
File renamed without changes.

0 comments on commit 5793b1f

Please sign in to comment.