mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-14 17:51:44 +03:00
fix tests
This commit is contained in:
parent
b2f8572c44
commit
bc03a89aa7
8
cache/repo_cache_test.go
vendored
8
cache/repo_cache_test.go
vendored
@ -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")
|
||||
|
@ -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())
|
||||
|
@ -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!
|
||||
|
@ -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!
|
||||
|
Loading…
Reference in New Issue
Block a user