Index: impl/memory/taskqueue_test.go |
diff --git a/impl/memory/taskqueue_test.go b/impl/memory/taskqueue_test.go |
index ebbfc297c9bab16d01c3e67c0120e3184d33ead2..a7f6d076e3aa5afb0cf3a46ce9c04a9f408f3988 100644 |
--- a/impl/memory/taskqueue_test.go |
+++ b/impl/memory/taskqueue_test.go |
@@ -31,7 +31,8 @@ func TestTaskQueue(t *testing.T) { |
c = Use(c) |
tq := tqS.Get(c) |
- tqt := tq.Raw().(tqS.Testable) |
+ tqt := tq.Testable() |
+ So(tqt, ShouldNotBeNil) |
So(tq, ShouldNotBeNil) |
@@ -245,7 +246,7 @@ func TestTaskQueue(t *testing.T) { |
Convey("can view regular tasks", func() { |
dsS.Get(c).RunInTransaction(func(c context.Context) error { |
- tqt := tqS.Get(c).Raw().(tqS.Testable) |
+ tqt := tqS.Get(c).Testable() |
So(tqt.GetScheduledTasks()["default"][t.Name], ShouldResemble, t) |
So(tqt.GetTombstonedTasks()["default"][t2.Name], ShouldResemble, t2) |
@@ -259,7 +260,7 @@ func TestTaskQueue(t *testing.T) { |
err := dsS.Get(c).RunInTransaction(func(c context.Context) error { |
tq := tqS.Get(c) |
- tqt := tq.Raw().(tqS.Testable) |
+ tqt := tq.Testable() |
So(tq.Add(t3, ""), ShouldBeNil) |
So(t3.Name, ShouldEqual, "") |
@@ -291,7 +292,7 @@ func TestTaskQueue(t *testing.T) { |
dsS.Get(c).RunInTransaction(func(c context.Context) error { |
ttq = tqS.Get(c) |
- tqt := ttq.Raw().(tqS.Testable) |
+ tqt := ttq.Testable() |
So(ttq.Add(t3, ""), ShouldBeNil) |
@@ -320,7 +321,7 @@ func TestTaskQueue(t *testing.T) { |
Convey("you can AddMulti as well", func() { |
dsS.Get(c).RunInTransaction(func(c context.Context) error { |
tq := tqS.Get(c) |
- tqt := tq.Raw().(tqS.Testable) |
+ tqt := tq.Testable() |
t.Name = "" |
tasks := []*tqS.Task{t.Duplicate(), t.Duplicate(), t.Duplicate()} |
@@ -348,7 +349,7 @@ func TestTaskQueue(t *testing.T) { |
So(tqS.Get(c).Add(t, "meat").Error(), ShouldContainSubstring, "UNKNOWN_QUEUE") |
Convey("unless you add it!", func() { |
- tqS.Get(c).Raw().(tqS.Testable).CreateQueue("meat") |
+ tqS.Get(c).Testable().CreateQueue("meat") |
So(tqS.Get(c).Add(t, "meat"), ShouldBeNil) |
}) |
@@ -382,10 +383,7 @@ func TestTaskQueue(t *testing.T) { |
func() { |
defer func() { recover() }() |
dsS.Get(c).RunInTransaction(func(c context.Context) error { |
- tq := tqS.Get(c).(interface { |
- tqS.Testable |
- tqS.Interface |
- }) |
+ tq := tqS.Get(c) |
So(tq.Add(tq.NewTask("/sandwitch/victory"), ""), ShouldBeNil) |