Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add public links check #2323

Merged
merged 2 commits into from
Aug 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions integrations/links_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// 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 integrations

import (
"net/http"
"testing"
)

func TestLinksNoLogin(t *testing.T) {
prepareTestEnv(t)

var links = []string{
"/explore/repos",
"/explore/repos?q=test&tab=",
"/explore/users",
"/explore/users?q=test&tab=",
"/explore/organizations",
"/explore/organizations?q=test&tab=",
"/",
"/user/sign_up",
"/user/login",
"/user/forgot_password",
"/swagger",
}

for _, link := range links {
req := NewRequest(t, "GET", link)
MakeRequest(t, req, http.StatusOK)
}
}