fix tests

This commit is contained in:
Michael Muré 2019-06-16 21:40:45 +02:00
parent b2f8572c44
commit bc03a89aa7
4 changed files with 9 additions and 9 deletions

View File

@ -37,11 +37,11 @@ func TestCache(t *testing.T) {
require.Len(t, cache.identities, 2)
// Create a bug
bug1, err := cache.NewBug("title", "message")
bug1, _, err := cache.NewBug("title", "message")
require.NoError(t, err)
// It's possible to create two identical bugs
bug2, err := cache.NewBug("title", "message")
bug2, _, err := cache.NewBug("title", "message")
require.NoError(t, err)
// two identical bugs yield a different id
@ -125,7 +125,7 @@ func TestPushPull(t *testing.T) {
require.NoError(t, err)
// Create a bug in A
_, err = cacheA.NewBug("bug1", "message")
_, _, err = cacheA.NewBug("bug1", "message")
require.NoError(t, err)
// A --> remote --> B
@ -145,7 +145,7 @@ func TestPushPull(t *testing.T) {
require.NoError(t, err)
// B --> remote --> A
_, err = cacheB.NewBug("bug2", "message")
_, _, err = cacheB.NewBug("bug2", "message")
require.NoError(t, err)
_, err = cacheB.Push("origin")

View File

@ -33,14 +33,14 @@ func TestSelect(t *testing.T) {
require.NoError(t, err)
for i := 0; i < 10; i++ {
_, err := repoCache.NewBugRaw(rene, time.Now().Unix(), "title", "message", nil, nil)
_, _, err := repoCache.NewBugRaw(rene, time.Now().Unix(), "title", "message", nil, nil)
require.NoError(t, err)
}
// and two more for testing
b1, err := repoCache.NewBugRaw(rene, time.Now().Unix(), "title", "message", nil, nil)
b1, _, err := repoCache.NewBugRaw(rene, time.Now().Unix(), "title", "message", nil, nil)
require.NoError(t, err)
b2, err := repoCache.NewBugRaw(rene, time.Now().Unix(), "title", "message", nil, nil)
b2, _, err := repoCache.NewBugRaw(rene, time.Now().Unix(), "title", "message", nil, nil)
require.NoError(t, err)
err = Select(repoCache, b1.Id())

View File

@ -2286,7 +2286,7 @@ type Repository {
}
type Mutation {
"""create a new bug"""
"""Create a new bug"""
newBug(input: NewBugInput!): NewBugPayload!
"""Add a new comment to a bug"""
addComment(input: AddCommentInput!): AddCommentPayload!

View File

@ -6,7 +6,7 @@ type Query {
}
type Mutation {
"""create a new bug"""
"""Create a new bug"""
newBug(input: NewBugInput!): NewBugPayload!
"""Add a new comment to a bug"""
addComment(input: AddCommentInput!): AddCommentPayload!