diff options
author | Ethan Koenig <ethantkoenig@gmail.com> | 2017-12-15 13:11:02 -0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-12-15 23:11:02 +0200 |
commit | befa7445d254cc88662015222c85ccd4c96b9a10 (patch) | |
tree | d9d7bc81d0eb05c026e8b6688871b38695d5af00 /modules/test/utils.go | |
parent | bde0409433531b024e30cf1a4d3e44051631ed85 (diff) | |
download | gitea-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.go | 14 |
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") +} |