Skip to content
Permalink
Browse files

test fix

  • Loading branch information...
hunterlong committed Mar 5, 2019
1 parent 60b38f9 commit 22dc1955f67cdbac35d831cb3edc6a838f75a1ae
Showing with 7 additions and 6 deletions.
  1. +7 −6 core/notifier/notifiers_test.go
@@ -16,6 +16,7 @@
package notifier

import (
"fmt"
"github.com/hunterlong/statping/source"
"github.com/hunterlong/statping/types"
"github.com/hunterlong/statping/utils"
@@ -98,15 +99,15 @@ func TestSelectNotification(t *testing.T) {

func TestAddQueue(t *testing.T) {
msg := "this is a test in the queue!"
example.AddQueue(0, msg)
assert.Equal(t, 1, len(example.Queue))
example.AddQueue(0, msg)
example.AddQueue(fmt.Sprintf("service_%v", 0), msg)
assert.Equal(t, fmt.Sprintf("service_%v", 1), len(example.Queue))
example.AddQueue(fmt.Sprintf("service_%v", 0), msg)
assert.Equal(t, 2, len(example.Queue))
example.AddQueue(0, msg)
example.AddQueue(fmt.Sprintf("service_%v", 0), msg)
assert.Equal(t, 3, len(example.Queue))
example.AddQueue(0, msg)
example.AddQueue(fmt.Sprintf("service_%v", 0), msg)
assert.Equal(t, 4, len(example.Queue))
example.AddQueue(0, msg)
example.AddQueue(fmt.Sprintf("service_%v", 0), msg)
assert.Equal(t, 5, len(example.Queue))
}

0 comments on commit 22dc195

Please sign in to comment.
You can’t perform that action at this time.