Index: impl/memory/info_test.go |
diff --git a/impl/memory/info_test.go b/impl/memory/info_test.go |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6c7fbac611825bb30f14f23e1a7a23aa007a58e1 |
--- /dev/null |
+++ b/impl/memory/info_test.go |
@@ -0,0 +1,28 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+package memory |
+ |
+import ( |
+ "testing" |
+ |
+ "github.com/luci/gae/service/info" |
+ "golang.org/x/net/context" |
+ |
+ . "github.com/smartystreets/goconvey/convey" |
+) |
+ |
+func TestMustNamespace(t *testing.T) { |
+ Convey("MustNamespace panics", t, func() { |
+ c := Use(context.Background()) |
+ i := info.Get(c) |
+ |
+ So(func() { |
+ i.MustNamespace("valid_namespace_name") |
+ }, ShouldNotPanic) |
+ So(func() { |
+ i.MustNamespace("invalid namespace name") |
+ }, ShouldPanic) |
+ }) |
+} |