aboutsummaryrefslogtreecommitdiffstats
path: root/graphql
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-02-16 13:48:46 +0100
committerMichael Muré <batolettre@gmail.com>2019-03-01 22:40:24 +0100
commitcd7ed7ff9e3250c10e97fe16c934b5a6151527bb (patch)
treee0d6df60e2a04ccb72b3d4c63fc57b4546df458c /graphql
parent21048e785d976a04e26798e4a385ee675c95b88f (diff)
downloadgit-bug-cd7ed7ff9e3250c10e97fe16c934b5a6151527bb.tar.gz
identity: add more test for serialisation and push/pull/merge + fixes
Diffstat (limited to 'graphql')
-rw-r--r--graphql/graphql_test.go16
1 files changed, 15 insertions, 1 deletions
diff --git a/graphql/graphql_test.go b/graphql/graphql_test.go
index 90381987..d571ce51 100644
--- a/graphql/graphql_test.go
+++ b/graphql/graphql_test.go
@@ -5,12 +5,26 @@ import (
"testing"
"github.com/MichaelMure/git-bug/graphql/models"
+ "github.com/MichaelMure/git-bug/misc/random_bugs"
+ "github.com/MichaelMure/git-bug/repository"
"github.com/MichaelMure/git-bug/util/test"
"github.com/vektah/gqlgen/client"
)
+func CreateFilledRepo(bugNumber int) repository.ClockedRepo {
+ repo := test.CreateRepo(false)
+
+ var seed int64 = 42
+ options := random_bugs.DefaultOptions()
+
+ options.BugNumber = bugNumber
+
+ random_bugs.CommitRandomBugsWithSeed(repo, options, seed)
+ return repo
+}
+
func TestQueries(t *testing.T) {
- repo := test.CreateFilledRepo(10)
+ repo := CreateFilledRepo(10)
handler, err := NewHandler(repo)
if err != nil {