summaryrefslogtreecommitdiffstats
path: root/modules/test/utils.go
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-12-15 13:11:02 -0800
committerLauris BH <lauris@nix.lv>2017-12-15 23:11:02 +0200
commitbefa7445d254cc88662015222c85ccd4c96b9a10 (patch)
treed9d7bc81d0eb05c026e8b6688871b38695d5af00 /modules/test/utils.go
parentbde0409433531b024e30cf1a4d3e44051631ed85 (diff)
downloadgitea-befa7445d254cc88662015222c85ccd4c96b9a10.tar.gz
gitea-befa7445d254cc88662015222c85ccd4c96b9a10.zip
Unit tests for routers/repo/issue_label (#3198)
Diffstat (limited to 'modules/test/utils.go')
-rw-r--r--modules/test/utils.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/test/utils.go b/modules/test/utils.go
new file mode 100644
index 0000000000..ed1628ab47
--- /dev/null
+++ b/modules/test/utils.go
@@ -0,0 +1,14 @@
+// Copyright 2017 The Gitea Authors. All rights reserved.
+// Use of this source code is governed by a MIT-style
+// license that can be found in the LICENSE file.
+
+package test
+
+import (
+ "net/http"
+)
+
+// RedirectURL returns the redirect URL of a http response.
+func RedirectURL(resp http.ResponseWriter) string {
+ return resp.Header().Get("Location")
+}