Skip to content

Commit

Permalink
init test
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonlvhit committed Aug 17, 2014
1 parent 45a671d commit 6083375
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions gocron_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Tests for gocron
package gocron

import (
"fmt"
"testing"
"time"
)

var err = 1

func task() string {
return "I am a running job."
}

func taskWithParams(a int, b string) (a_ int, b_ string) {
return a, b
}

func TestSecond(*testing.T) {
now := time.Now()
default_scheduler.Every(1).Second().Do(task)
default_scheduler.Every(1).Second().Do(taskWithParams, 1, "hello")
}

0 comments on commit 6083375

Please sign in to comment.