diff options
author | Michael Muré <batolettre@gmail.com> | 2019-02-16 13:48:46 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-03-01 22:40:24 +0100 |
commit | cd7ed7ff9e3250c10e97fe16c934b5a6151527bb (patch) | |
tree | e0d6df60e2a04ccb72b3d4c63fc57b4546df458c /graphql/graphql_test.go | |
parent | 21048e785d976a04e26798e4a385ee675c95b88f (diff) | |
download | git-bug-cd7ed7ff9e3250c10e97fe16c934b5a6151527bb.tar.gz git-bug-cd7ed7ff9e3250c10e97fe16c934b5a6151527bb.zip |
identity: add more test for serialisation and push/pull/merge + fixes
Diffstat (limited to 'graphql/graphql_test.go')
-rw-r--r-- | graphql/graphql_test.go | 16 |
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 { |